Skip to content

Register a customer

Request

POST /customers

Register a new customer

Security
bearerAuth
Bodyapplication/jsonrequired
emailstring, (email)required

Contact email

Example:"joao@example.com"
phonestring^\+55\d{10,11}$required

E.164 format — Brazilian numbers only (+55 followed by 10 or 11 digits)

Example:"+5511999999999"
cpfstring^\d{3}\.\d{3}\.\d{3}-\d{2}$required

Customer CPF (required)

Example:"123.456.789-00"
cnpjstring^\d{2}\.\d{3}\.\d{3}/\d{4}-\d{2}$required

Company CNPJ

Example:"12.345.678/0001-90"
external_idstring

Partner external reference for this customer

Example:"partner-ref-123"
namestring

Customer's full name, auto-fetched from government records via CPF when not provided

Example:"Joao Silva"
curl -X POST https://api.dinie.com/api/v3/customers \
  -H "Authorization: Bearer $DINIE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "cpf": "123.456.789-00",
    "email": "joao@example.com",
    "phone": "+5511999999999",
    "external_id": "partner-ref-123"
  }'

Responses

Customer created

Bodyapplication/json
idstring(CustomerId)^cust_[0-9a-f]{32}$required

Unique customer identifier

Example:"cust_550e8400e29b41d4a716446655440000"
external_idstring or nullrequired

Partner's reference ID for this customer

Example:"partner-ref-123"
namestring or nullrequired

Legal name of the business owner

Example:"Joao Silva"
emailstring, (email)required

Contact email

Example:"joao@example.com"
phonestring^\+[1-9]\d{1,14}$required

Contact phone in E.164 format

Example:"+5511999999999"
cpfstring^\d{3}\.\d{3}\.\d{3}-\d{2}$required

Customer CPF. Always formatted as XXX.XXX.XXX-XX in responses

Example:"123.456.789-00"
cnpjstring or null^\d{2}\.\d{3}\.\d{3}/\d{4}-\d{2}$required

Company CNPJ. Always formatted as XX.XXX.XXX/XXXX-XX in responses

Example:"12.345.678/0001-90"
trading_namestring or nullrequired

Business trade name

Example:"Loja do Joao"
statusstringrequired

Lifecycle state: creating, pending_kyc, under_review, active, denied

Enum ValueDescription
creating

Registration received, co-owner enrichment in progress

pending_kyc

Customer registered, but KYC documents/biometrics not yet submitted or under review

under_review

All required KYC items submitted; Dinie's compliance team is reviewing

active

KYC approved; customer is eligible to receive credit offers

denied

Permanently blocked (fraud, closed company, or other terminal condition)

created_atinteger, (int64)required

When this resource was created (Unix epoch seconds)

updated_atinteger, (int64)required

When this resource was last modified (Unix epoch seconds)

kycArray of any(KycRequirement)

KYC requirements array. Omitted during creating status. Present from pending_kyc onward

Response
{ "id": "cust_550e8400e29b41d4a716446655440000", "status": "creating", "cpf": "123.456.789-00", "cnpj": "12.345.678/0001-90", "name": null, "email": "joao@example.com", "phone": "+5511999999999", "trading_name": null, "external_id": "partner-ref-123", "created_at": 1709546400, "updated_at": 1709632800 }