Criar cliente
curl --request POST \
--url https://api.upag.io/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"document": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', document: {}})
};
fetch('https://api.upag.io/v1/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/customers';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', document: {}})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Clientes
Criar cliente
Cadastra um cliente na conta
POST
https://api.upag.io
/
v1
/
customers
Criar cliente
curl --request POST \
--url https://api.upag.io/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"document": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', document: {}})
};
fetch('https://api.upag.io/v1/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/customers';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', document: {}})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Endpoint
curl -X POST https://api.upag.io/v1/customers \
-H "Authorization: Bearer sk_test_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "John Customer",
"email": "john@example.com",
"document": { "type": "cpf", "number": "12345678901" },
"phone": { "countryCode": "55", "areaCode": "11", "number": "999998888" },
"address": {
"street": "Rua A",
"number": "100",
"neighborhood": "Centro",
"city": "Sao Paulo",
"state": "SP",
"country": "BR",
"zip": "01001000"
}
}'
Parâmetros
string
required
Nome do cliente.
object
required
{ "type": "cpf" | "cnpj", "number": "..." }.string
E-mail.
object
countryCode, areaCode, number.object
Campos de endereço (
street, number, complement, neighborhood, city, state, country, zip).Resposta
201 Created
Response
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "John Customer",
"email": "john@example.com",
"document": {
"number": "12345678901",
"type": "cpf"
},
"phone": {
"countryCode": "55",
"areaCode": "11",
"number": "999998888"
},
"address": {
"street": "Rua A",
"number": "100",
"complement": "Apto 1",
"neighborhood": "Centro",
"city": "Sao Paulo",
"state": "SP",
"country": "BR",
"zip": "01001000"
},
"createdAt": "2026-03-18T11:00:00.000Z",
"updatedAt": "2026-03-18T11:00:00.000Z"
}