> ## Documentation Index
> Fetch the complete documentation index at: https://docs.developers.mijnklantportaal.nl/llms.txt
> Use this file to discover all available pages before exploring further.

# Create agreement

> Creating a new agreement. **Note**: This endpoint accepts only `multipart/form-data`.



## OpenAPI

````yaml /openapi.yaml post /agreements
openapi: 3.1.1
info:
  title: MijnKlantportaal API
  version: v1
servers:
  - url: https://api.mijnklantportaal.nl/v1
security:
  - APIKey: []
tags:
  - name: Agreements API
  - name: Appointments API
  - name: Customers API
  - name: Customer Groups API
  - name: Customer Invoices API
  - name: Customer Offers API
  - name: Customer Subscriptions API
  - name: Customer Subscription Packages API
  - name: Files API
  - name: File Request API
  - name: File Share API
  - name: Invoices API
  - name: Payment Links API
  - name: Punch Cards API
  - name: Tickets API
  - name: Webhooks API
paths:
  /agreements:
    post:
      tags:
        - Agreements API
      summary: Create agreement
      description: >-
        Creating a new agreement. **Note**: This endpoint accepts only
        `multipart/form-data`.
      operationId: create-agreement
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - name
                - signerName
                - signerSignatureData
                - signers
                - documents
              properties:
                name:
                  type: string
                  example: Service contract
                  description: Name of the agreement
                  required: true
                signerName:
                  type: string
                  example: John Doe
                  description: Name of the signer in the name of the company of the portal
                signerSignatureData:
                  type: string
                  example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAA...
                  description: Base64-encoded data-string of the signature image
                signers:
                  type: array
                  description: >-
                    An array of objects with information about the needed
                    signers. Per agreement, a maximum of 5 signers is permitted.
                  items:
                    type: object
                    required:
                      - firstName
                      - lastName
                      - email
                      - shouldIdentify
                    properties:
                      firstName:
                        type: string
                        example: Dirk Jan
                        description: >-
                          First name of the signer. **Please note**: If you
                          decide that the signer needs to identify, use the full
                          legal name to match with the identity document.
                      lastName:
                        type: string
                        example: Bakker
                        description: >-
                          Last name of the signer. **Please note**: If you
                          decide that the signer needs to identify, use the full
                          legal name to match with the identity document.
                      email:
                        type: string
                        example: dj.bakker@domain.com
                        description: >-
                          Email address of the signer. An email with details to
                          sign will be sent to here.
                      shouldIdentify:
                        type: boolean
                        example: true
                        description: >-
                          Indicates if the signer should identify
                          himself/herself. Enough balance for the portal is
                          required.
                documents:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: >-
                    The documents which are part of this agreement. Maximum of 5
                    documents per agreement, upon a total of 5MB.
      responses:
        '201':
          description: Returning the created Agreement
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgreementWithDetails'
        '402':
          description: >-
            The portal has not enough balance for this agreement and it's
            options
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_ApiError'
        '422':
          description: Something is wrong with the posted data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_ApiError'
        '426':
          description: Agreements is not available in the current license
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_ApiError'
components:
  schemas:
    AgreementWithDetails:
      type: object
      description: Agreement with details
      properties:
        id:
          type: string
          example: agr_abc12346def678
          description: ID of the agreement, always starting with `agr_`.
        name:
          type: string
          example: Service contract
          description: Name of the agreement
        status:
          type: string
          example: sent
          description: Status of the agreement. Can be `sent` or `signed`.
        signerName:
          type: string
          example: John Doe
          description: Name of the person who signed in name of the company of the portal
        signerSignature:
          type: string
          example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAA...
          description: Base64-encoded string of the signature image
        signerSignatureHash:
          type: string
          example: PwZVOc2K5rqcpqljbM2xkzJub9FtmA307pvuoJXoiqHDuEyZB7NVqdKbb3SPXt1P
          description: >-
            Hash of the `signerSignature` in combination with the signing
            datetime to ensure integrity
        signers:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AgreementSigner'
          description: An array with the signer(s) for this agreement
        documents:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/AgreementDocument'
          description: An array with the document(s) for this agreement
        createdAt:
          type: string
          example: '2025-09-13T17:23:14+02:00'
          description: >-
            Date and time when the agreement is created in MijnKlantportaal,
            written in ATOM format.
    Error_ApiError:
      type: object
      properties:
        message:
          type: string
          description: Explanation what went wrong
    AgreementSigner:
      type: object
      description: Agreement Signer
      properties:
        id:
          type: string
          example: ags_abc12346def678
          description: ID of the signer, always starting with `ags_`.
        firstName:
          type: string
          example: Dirk Jan
          description: First name of the signer
        lastName:
          type: string
          example: Bakker
          description: Last name of the signer
        email:
          type: string
          example: dj.bakker@domain.com
          description: Email address of the signer
        shouldIdentify:
          type: boolean
          example: true
          description: Indicates if the signer needs to verify himself/herself
        signature:
          type: string
          example: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAA...
          description: Base64-encoded string of the signature image
        signatureHash:
          type: string
          example: PwZVOc2K5rqcpqljbM2xkzJub9FtmA307pvuoJXoiqHDuEyZB7NVqdKbb3SPXt1P
          description: >-
            Hash of the `signature` in combination with some other values to
            ensure integrity
        signedAt:
          type: string
          example: '2025-09-13T17:23:14+02:00'
          description: >-
            Date and time when the signer has signed the agreement, written in
            ATOM format.
    AgreementDocument:
      type: object
      description: Agreement Document
      properties:
        id:
          type: string
          example: agd_abc12346def678
          description: ID of the agreement document, always starting with `agd_`.
        documentName:
          type: string
          example: Contract version_2.pdf
          description: Name of the file
        fileSize:
          type: integer
          example: 512
          description: Size of the file in bytes
        fileHash:
          type: string
          example: PwZVOc2K5rqcpqljbM2xkzJub9FtmA307pvuoJXoiqHDuEyZB7NVqdKbb3SPXt1P
          description: Hash of the document's content to ensure integrity
  securitySchemes:
    APIKey:
      type: http
      scheme: bearer

````