Skip to main content
POST
/
agreements
Create agreement
curl --request POST \
  --url https://api.mijnklantportaal.nl/v1/agreements \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'name=Service contract' \
  --form 'signerName=John Doe' \
  --form 'signerSignatureData=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAA...' \
  --form 'signers={
  "firstName": "Dirk Jan",
  "lastName": "Bakker",
  "email": "dj.bakker@domain.com",
  "shouldIdentify": true
}'
{
  "id": "agr_abc12346def678",
  "name": "Service contract",
  "status": "sent",
  "signerName": "John Doe",
  "signerSignature": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAA...",
  "signerSignatureHash": "PwZVOc2K5rqcpqljbM2xkzJub9FtmA307pvuoJXoiqHDuEyZB7NVqdKbb3SPXt1P",
  "signers": [
    {
      "id": "ags_abc12346def678",
      "firstName": "Dirk Jan",
      "lastName": "Bakker",
      "email": "dj.bakker@domain.com",
      "shouldIdentify": true,
      "signature": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAA...",
      "signatureHash": "PwZVOc2K5rqcpqljbM2xkzJub9FtmA307pvuoJXoiqHDuEyZB7NVqdKbb3SPXt1P",
      "signedAt": "2025-09-13T17:23:14+02:00"
    }
  ],
  "documents": [
    {
      "id": "agd_abc12346def678",
      "documentName": "Contract version_2.pdf",
      "fileSize": 512,
      "fileHash": "PwZVOc2K5rqcpqljbM2xkzJub9FtmA307pvuoJXoiqHDuEyZB7NVqdKbb3SPXt1P"
    }
  ],
  "createdAt": "2025-09-13T17:23:14+02:00"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
name
string
required

Name of the agreement

Example:

"Service contract"

signerName
string
required

Name of the signer in the name of the company of the portal

Example:

"John Doe"

signerSignatureData
string
required

Base64-encoded data-string of the signature image

Example:

"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAA..."

signers
object[]
required

An array of objects with information about the needed signers. Per agreement, a maximum of 5 signers is permitted.

documents
file[]
required

The documents which are part of this agreement. Maximum of 5 documents per agreement, upon a total of 5MB.

Response

Returning the created Agreement

Agreement with details

id
string

ID of the agreement, always starting with agr_.

Example:

"agr_abc12346def678"

name
string

Name of the agreement

Example:

"Service contract"

status
string

Status of the agreement. Can be sent or signed.

Example:

"sent"

signerName
string

Name of the person who signed in name of the company of the portal

Example:

"John Doe"

signerSignature
string

Base64-encoded string of the signature image

Example:

"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAA..."

signerSignatureHash
string

Hash of the signerSignature in combination with the signing datetime to ensure integrity

Example:

"PwZVOc2K5rqcpqljbM2xkzJub9FtmA307pvuoJXoiqHDuEyZB7NVqdKbb3SPXt1P"

signers
object[] | null

An array with the signer(s) for this agreement

documents
object[] | null

An array with the document(s) for this agreement

createdAt
string

Date and time when the agreement is created in MijnKlantportaal, written in ATOM format.

Example:

"2025-09-13T17:23:14+02:00"

I