# Customers (/fr/docs/customers)

<Endpoint method="POST" path="/v1/customers" href="/api#tag/customers/POST/v1/customers" />

You register a customer with **your own identifier** (`external_id`), so you can always find it from your system.

| Field | Required | Description |
| --- | --- | --- |
| `external_id` | Yes | Your id, up to 128 characters. |
| `type` | Yes | `individual` or `business`. |
| `country` | Yes | Country of residence or incorporation (ISO alpha-2). |
| `display_name` | Yes | Name, up to 200 characters. |
| `profile` | Depends on the country | Identity details (below). |
| `metadata` | No | Up to 20 keys of your own. Never personal data. |

## The profile [#the-profile]

| Field | For |
| --- | --- |
| `first_name`, `last_name` | Individuals. Sent together. |
| `date_of_birth` | Individuals, `YYYY-MM-DD`. |
| `identity_document_type`, `identity_document` | Sent together. Types: `DNI`, `RUC`, `CE`, `PAS`, `PTP`, `PASSPORT`, `NATIONAL_ID`, `RESIDENCE_PERMIT`, `TAX_ID`, `DRIVER_LICENSE`. |
| `identity_document_country` | Country that issued the document. |
| `email`, `phone`, `tax_id` | Contact and tax details. |
| `registration_number` | Businesses. |
| `address` | `line1`, `line2`, `city`, `state`, `postal_code`, `country`. |

**What each country requires** is described by `customer_fields` in capabilities. For example, a payout in soles requires the sender to be an `individual` with first name, last names, date of birth, document, and city.

<Callout type="warn" title="Complete the profile before paying">
Sender details are validated when the payout goes out to the bank, not when it's created. A payout with an incomplete sender is accepted and then fails with `failure_code: invalid_instruction`. Validate the profile against `customer_fields` before paying.
</Callout>

## Repeating a registration [#repeating-a-registration]

If you send the same `external_id` again with the same data, you get the existing customer (`200`). With different data, `409 external_id_conflict`.

## Statuses [#statuses]

| `status` | Meaning |
| --- | --- |
| `active` | Normal. |
| `blocked` | Caibo stopped it: its beneficiaries can't be paid. |
| `closed` | Closed, permanently. |

With <Endpoint method="PATCH" path="/v1/customers/{id}" href="/api#tag/customers/PATCH/v1/customers/{id}" /> you change `metadata` or close the customer (`status: closed`). `compliance_status` (`unverified`, `pending`, `verified`, `rejected`, `review`) is changed only by Caibo's verifications.

Events: `customer.created`, `customer.updated`, `customer.status_changed`. Events never include the profile.
