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

# Nieuwe klant aanmaken

> Voegt een nieuwe klant toe aan je ClientBox database.

**Let op:** Het e-mailadres moet uniek zijn. Als het al bestaat, krijg je een `409 Conflict` error terug.



## OpenAPI

````yaml openapi.json post /create-customer
openapi: 3.0.0
info:
  title: ClientBox API
  version: 1.1.0
  description: >-
    Welkom bij de ClientBox API documentatie.


    Gebruik deze API om klanten te beheren, facturen te sturen en workflows te
    automatiseren vanuit je eigen applicatie.


    ### Authenticatie

    Alle endpoints vereisen een `Bearer Token`. Voeg deze toe aan de header:

    `Authorization: Bearer JOUW_API_KEY`
  contact:
    name: ClientBox Support
    email: support@clientbox.co
servers:
  - url: https://api.clientbox.co/api/1.1/wf
    description: Productie Server
security:
  - BearerAuth: []
tags:
  - name: Customers
    description: Beheer je klantenbestand en contactgegevens.
  - name: Invoices
    description: Maak en verstuur facturen direct naar klanten.
paths:
  /create-customer:
    post:
      tags:
        - Customers
      summary: Nieuwe klant aanmaken
      description: >-
        Voegt een nieuwe klant toe aan je ClientBox database.


        **Let op:** Het e-mailadres moet uniek zijn. Als het al bestaat, krijg
        je een `409 Conflict` error terug.
      operationId: createCustomer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
                - first_name
                - last_name
              properties:
                first_name:
                  type: string
                  description: De voornaam van de klant.
                  example: Sophie
                last_name:
                  type: string
                  description: De achternaam van de klant.
                  example: de Vries
                email:
                  type: string
                  format: email
                  description: Het zakelijke e-mailadres. Wordt gebruikt voor communicatie.
                  example: sophie@start-up.nl
                company_name:
                  type: string
                  description: 'Optioneel: Bedrijfsnaam.'
                  example: Tech B.V.
      responses:
        '200':
          description: Klant succesvol aangemaakt.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: Validatie fout.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Customer:
      type: object
      properties:
        id:
          type: string
          example: cust_12345
        name:
          type: string
          example: Jan Jansen
        email:
          type: string
          example: jan@bedrijf.nl
    Error:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          example: Ongeldige input data.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````