---
search:
  tags:
    - Customers
    - POST
seo:
  description: >-
    If a contact with the given email already exists for this shop, it is
    updated rather than… Reference for the POST /customers endpoint in the
    Bolder API v2.
sidebar:
  label: Create a customer
  badge: POST
title: Create a customer
type: openapi-operation
---
If a contact with the given `email` already exists for this shop, it is updated rather than duplicated.

`POST /customers`

**cURL**

```bash
curl -s -X POST \
  -H "Authorization: Bearer $BOLDER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"shop_id":1,"email":"newcustomer@example.com","name":"Jane Smith"}' \
  "https://api.onbolder.com/v2/customers"
```

**Request body** (`application/json`, required)

- `email` (string<email>, required) — Contact email address. Used as the unique identifier for find-or-create.
- `name` (string, required) — Full name (first and last).
- `phone_number` (string)
- `company_name` (string) — Company name. Creates or finds a company record automatically.
- `company_id_number` (string) — Company tax/ID number (RUT, DNI, etc.), stored with the company record.
- `tags` (string[]) — Tag names. Replaces all existing tags.
- `opt_in` (boolean) — Whether the contact accepts marketing emails/newsletters.
- `contact_group_id` (integer) — Contact group ID to assign this contact to.
- `salesperson_id` (string) — Shop admin user ID
- `source` (string) — Origin of the contact record. Defaults to \`API\` if omitted on create.
- `custom_data` (object[]) — Custom field values for this contact.
- `shop_id` (integer, required)

Request body example:

```json
{
  "shop_id": 1,
  "email": "newcustomer@example.com",
  "name": "Jane Smith"
}
```

**Responses**

- `201` — Customer created
- `422` — Validation error

Response example, 201:

```json
{
  "id": 3001,
  "shop_id": 1,
  "email": "newcustomer@example.com",
  "name": "Jane Smith",
  "customer_status": "public",
  "phone_validated": false,
  "created_on": "2024-06-20T14:00:00Z",
  "_links": {
    "self": {
      "href": "https://api.onbolder.com/v2/customers/3001"
    },
    "orders": {
      "href": "https://api.onbolder.com/v2/orders?shop_id=1&contact_email=newcustomer@example.com"
    }
  }
}
```
