Skip to main content
POST
/
v1
/
customers
Create a customer
curl --request POST \
  --url https://api.yuvexpay.com/v1/customers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Idempotency-Key: <x-idempotency-key>' \
  --data '
{
  "name": "Maria Silva",
  "email": "maria@example.com",
  "document": "12345678900",
  "documentType": "CPF",
  "phone": "+5511999999999",
  "externalId": "cust-001",
  "metadata": {
    "plan": "premium"
  }
}
'
{
  "customer": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "email": "<string>",
    "document": "<string>",
    "phone": "<string>",
    "externalId": "<string>",
    "isActive": true,
    "createdAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

API access token obtained from POST /oauth/token. Include as Authorization: Bearer {token}.

Headers

X-Idempotency-Key
string
required

A unique string to ensure the request is processed only once. Must be unique per request. Valid for 24 hours.

Maximum string length: 100

Body

application/json
externalId
string

Your own customer ID.

Maximum string length: 100
name
string
Required string length: 1 - 200
email
string<email>
Maximum string length: 255
document
string

CPF or CNPJ number.

Maximum string length: 20
documentType
enum<string>
Available options:
CPF,
CNPJ
phone
string
Maximum string length: 20
metadata
object

Response

Customer created.

customer
object