Skip to main content
POST
Crear un cliente
Creates a customer in your CRM. Only name is mandatory — everything else can be filled in later with PATCH /v1/crm/customers/:id. The company and project are taken from your token and must not appear in the body. Sending them returns 400.

Endpoint

Required scope

crm:customers:write

Headers

Body

Example request

Response

201 Created

400 Bad Request

Missing name, malformed email, an identification_type outside the allowed set, or a property the endpoint does not accept — including company and project, which are derived from the token.

401 Unauthorized

Missing, invalid, revoked, or expired token.

403 Forbidden

The token does not have the crm:customers:write scope.

502 Bad Gateway

The CRM service could not complete the write. The most common cause is a duplicate identification_number — see the note below.

Operational notes

  • identification_number is unique per company, and the collision is not handled gracefully. Creating a second customer with an identification_number that already exists in your company fails with 502, not a 409. Check with GET /v1/crm/customers before creating, or leave the field empty. Email and phone have no uniqueness constraint and can repeat freely.
  • No implicit deduplication. Two POSTs with the same name and phone create two customers. If you are syncing from an external system, put its id in external_ids and look the customer up by phone before creating.

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Body

application/json
name
string
required

Nombre del cliente

last_name
string
email
string
phone
string
identification_number
string

Único por company cuando se informa

identification_type
enum<string>
Available options:
rut,
dni,
passport,
other
identification_country
string

Código de país ISO 3166-1 alpha-2

external_ids
object[]
custom_fields
object

Campos personalizados de la company

tags
string[]

Ids de tags del CRM

accepts_marketing
boolean
default:false

Response

201 - application/json
customer
object
required