# Create customer

Customer creation is elemental to the Notify API: this is where most invoice implementations start off. Once you have [created a customer](/customers/create-customer.md), you can create invoices for the customer. without a customer id, you can't create invoices. So always start with the customer API first or [search](/customers/search-customer.md) for the customer id. In both responses you'll find the unique customer id you can use for your invoices.

## Create customer

<mark style="color:green;">`POST`</mark> `https://api.notify.cm/v2/customers`

**Authentication:** `API keys`

#### Query Parameters

| Name      | Type    | Description                                                                                                                                         |
| --------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Overwrite | boolean | Optional if you want to overwrite information when a customer with the same `CustomerCode` already exists. we advise to use the update API instead. |

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Authorization | string | Your test or live API key |

#### Request Body

| Name               | Type   | Description                                      |
| ------------------ | ------ | ------------------------------------------------ |
| CustomerCode       | string | Your unique customer code. Max. 250 characters   |
| Name               | string | The name of the customer. Max 250 characters     |
| Address            | string | Max. 250 characters                              |
| Postalcode         | string | Max. 10 characters                               |
| City               | string | Max. 250 characters                              |
| Country            | string | Two characters country code, see documentation   |
| Contact            | string | The full name of the contact. Max 250 characters |
| Phone              | string | Max. 20 characters                               |
| Mobile             | string | Max. 20 characters                               |
| Email              | string | Max. 250 characters                              |
| InvoiceEmail       | string | Address for invoices only. Max. 250 characters   |
| RegistrationNumber | string | Chamber of Commerce Registration number          |
| Language           | string | Language code. See documentation                 |

{% tabs %}
{% tab title="201 " %}

```
HTTP/1.1 201 Created
Content-Type: application/hal+json

{
        "resource": "customer",
        "id": "a0f0660d-6c8d-422b-8114-e363b260521e",
        "customerCode":"10001",
        "name":"Creditpartners B.V.",
        "address": {
                "address":"",
                "postalcode":"",
                "city":"",
                "country":"NL"
        },
        "contact":"",
        "phone":"",
        "mobile":"",
        "email":"demo@notify.nl",
        "invoiceEmail":"",
        "registrationNumber":"",
        "language":"dutch"
}
```

{% endtab %}

{% tab title="400 " %}

```
HTTP/1.1 400 Bad Request
Content-Type: application/json

{
    "status": 405,
    "title": "Bad Request",
    "detail": "Field email in wrong format"
}
```

{% endtab %}
{% endtabs %}

### Example&#x20;

```http
curl -X POST https://api.notify.cm/v2/customers \
   -H "Authorization: Bearer test_R7HQ9QpXgx8J32rW9X9UyXjgfNk6C7TQ2UD8M5rwf8vVnYxnSETvSuEC6SKFW8Ug" \
   -d "number=10001" \
   -d "name=Creditpartners B.V." \
   -d "email=demo@notify.nl"
```

### Response

```markup
HTTP/1.1 201 Created
Content-Type: application/hal+json

{
        "resource": "customer",
        "id": "a0f0660d-6c8d-422b-8114-e363b260521e",
        "customerCode":"10001",
        "name":"Creditpartners B.V.",
        "address": {
                "address":"",
                "postalcode":"",
                "city":"",
                "country":"NL"
        },
        "contact":"",
        "phone":"",
        "mobile":"",
        "email":"demo@notify.nl",
        "invoiceEmail":"",
        "registrationNumber":"",
        "language":"dutch"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.notify.nl/customers/create-customer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
