> ## 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 Customer

> Adding a new customer to your portal



## OpenAPI

````yaml /openapi.yaml post /customers
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:
  /customers:
    post:
      tags:
        - Customers API
      summary: Create Customer
      description: Adding a new customer to your portal
      operationId: create-customer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - companyName
                - address
                - zipCode
                - city
                - primaryEmail
              properties:
                companyName:
                  type: string
                  example: Test Company BV
                  description: Name of the customer
                address:
                  type: string
                  example: Teststreet 123
                  description: Street name and number of the customer
                zipCode:
                  type: string
                  example: 1234AB
                  description: Zip code of the customer
                city:
                  type: string
                  example: Amsterdam
                  description: City of the customer
                countryCode:
                  type: string
                  example: NL
                  description: >-
                    ISO 3166-1 alpha-2 country code (2 letters). Will fallback
                    to `NL` when not provided.
                primaryEmail:
                  type: string
                  example: john.doe@test.com
                  description: >-
                    Primary email of the customer. This will be used to send
                    notification to.
      responses:
        '201':
          description: Returning the created Customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '422':
          description: Something is wrong with the posted data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_ApiError'
components:
  schemas:
    Customer:
      type: object
      description: Customer
      properties:
        id:
          type: string
          example: cst_abc12345def678
          description: ID of the customer, always starting with `cst_`.
        companyName:
          type: string
          example: Test Company BV
          description: Name of the customer
        address:
          type: string
          example: Teststreet 123
          description: Street name and number of the customer
        zipCode:
          type: string
          example: 1234AB
          description: Zip code of the customer
        city:
          type: string
          example: Amsterdam
          description: City of the customer
        countryCode:
          type: string
          example: NL
          description: The two-letter country code (ISO 3166-1 alpha-2)
        primaryEmail:
          type: string
          example: john.doe@test.com
          description: >-
            Primary email of the customer. This will be used to send
            notification to.
        phone:
          type: string
          nullable: true
          example: '+312012345678'
          description: Phone number, if available, including country code.
        integration:
          type: string
          nullable: true
          example: acumulus
          description: >-
            If the customer is linked to a bookkeeping integration, the ID of
            the integration is set here.
        integrationId:
          type: string
          nullable: true
          example: '123456789'
          description: >-
            If the customer is linked to a bookkeeping integration, the ID of
            the customer in the integration is set here.
        customerGroups:
          type: array
          description: An array of Customer Group IDs of which this customer is part of
          items:
            type: string
            example: cug_123abc567
        createdAt:
          type: string
          example: '2024-04-28T21:00:00+02:00'
          description: >-
            Date and time when the customer is added to MijnKlantportaal.
            Written in ATOM format.
    Error_ApiError:
      type: object
      properties:
        message:
          type: string
          description: Explanation what went wrong
  securitySchemes:
    APIKey:
      type: http
      scheme: bearer

````