Skip to main content
PATCH
/
v1
/
customers
/
{customer_id}
Update customer
curl --request PATCH \
  --url https://api-sandbox.y.uno/v1/customers/{customer_id} \
  --header 'Content-Type: application/json' \
  --header 'private-secret-key: <api-key>' \
  --header 'public-api-key: <api-key>' \
  --data '
{
  "email": "maria.updated@example.com",
  "phone": {
    "country_code": "55",
    "number": "11888880000"
  }
}
'
{
  "id": "c9d0e1f2-3a4b-5c6d-7e8f-9a0b1c2d3e4f",
  "merchant_customer_id": "cust-internal-001",
  "merchant_customer_created_at": "2024-01-15T12:34:56.123456Z",
  "first_name": "Maria",
  "last_name": "Silva",
  "email": "maria.silva@example.com",
  "gender": "F",
  "date_of_birth": "1990-02-28",
  "country": "BR",
  "nationality": "BR",
  "document": {
    "document_type": "CPF",
    "document_number": "12345678901"
  },
  "phone": {
    "country_code": "55",
    "number": "11999990000"
  },
  "billing_address": {
    "address_line_1": "Av. Paulista, 1000",
    "address_line_2": "Apto 502",
    "city": "São Paulo",
    "state": "SP",
    "country": "BR",
    "zip_code": "01310100",
    "neighborhood": "Bela Vista"
  },
  "shipping_address": {
    "address_line_1": "Av. Paulista, 1000",
    "address_line_2": "Apto 502",
    "city": "São Paulo",
    "state": "SP",
    "country": "BR",
    "zip_code": "01310100",
    "neighborhood": "Bela Vista"
  },
  "metadata": [
    {
      "key": "loyalty_tier",
      "value": "gold"
    },
    {
      "key": "signup_source",
      "value": "web"
    }
  ],
  "created_at": "2026-03-01T10:00:00.000000Z",
  "updated_at": "2026-03-01T10:00:00.000000Z"
}

Authorizations

public-api-key
string
header
required

Your public API key from the Yuno Dashboard

private-secret-key
string
header
required

Your private secret key (server-side only)

Path Parameters

customer_id
string<uuid>
required

The unique identifier of the customer

Body

application/json

Request body for creating or updating a customer. Only merchant_customer_id is required; every other field is optional, but the more information you supply, the better the downstream authorization, conversion, and fraud-prevention rates.

merchant_customer_id
string
required

Your unique identifier for this customer in your own platform. Must be unique within your Yuno account — POSTing twice with the same value returns a CUSTOMER_ID_DUPLICATED 400 error. Use this ID to retrieve the customer later via Retrieve Customer by External ID.

Required string length: 3 - 255
Example:

"cust-internal-001"

merchant_customer_created_at
string<date-time>

Date the customer was originally registered on your platform. ISO 8601 format with microseconds and Z suffix (e.g., 2024-01-15T12:34:56.123456Z). Used by some risk providers as a tenure signal.

Required string length: 27
Example:

"2024-01-15T12:34:56.123456Z"

first_name
string

Customer's first name (legal first name as it appears on the identification document).

Required string length: 3 - 255
Example:

"Maria"

last_name
string

Customer's last name (legal surname as it appears on the identification document).

Required string length: 3 - 255
Example:

"Silva"

email
string<email>

Customer's email address. Strongly recommended — required by most APMs (PIX, Boleto, OXXO, PSE) and by 3DS challenge flows.

Required string length: 3 - 255
Example:

"maria.silva@example.com"

gender
enum<string>

Customer's gender. M (male), F (female), or NB (non-binary). Any other value is rejected with HTTP 400.

Available options:
M,
F,
NB
Example:

"F"

date_of_birth
string<date>

Customer's date of birth in YYYY-MM-DD format.

Required string length: 10
Pattern: ^\d{4}-\d{2}-\d{2}$
Example:

"1990-02-28"

country
string

Customer's country of residence. ISO 3166-1 alpha-2 code.

Required string length: 2
Pattern: ^[A-Z]{2}$
Example:

"BR"

nationality
string

Customer's nationality. ISO 3166-1 alpha-2 code.

Required string length: 2
Pattern: ^[A-Z]{2}$
Example:

"BR"

document
object

Customer's identification document. Both fields are required when the document object is sent. Yuno does not enforce a fixed enum on document_type; pass the local code expected by the destination payment method.

Example:
{
  "document_type": "CPF",
  "document_number": "12345678901"
}
phone
object

Customer's phone number, split into country calling code and the local number. Both fields are required when the phone object is sent.

Example:
{
  "country_code": "57",
  "number": "3132450765"
}
billing_address
object

Postal address. Used for both billing_address and shipping_address. All fields are optional, but providing as much detail as possible improves authorization rates and downstream fraud-prevention scoring.

Example:
{
  "address_line_1": "Calle 34 # 56 - 78",
  "address_line_2": "Apartamento 502, Torre I",
  "city": "Bogotá",
  "state": "Cundinamarca",
  "country": "CO",
  "zip_code": "111111",
  "neighborhood": "Chapinero"
}
shipping_address
object

Postal address. Used for both billing_address and shipping_address. All fields are optional, but providing as much detail as possible improves authorization rates and downstream fraud-prevention scoring.

Example:
{
  "address_line_1": "Calle 34 # 56 - 78",
  "address_line_2": "Apartamento 502, Torre I",
  "city": "Bogotá",
  "state": "Cundinamarca",
  "country": "CO",
  "zip_code": "111111",
  "neighborhood": "Chapinero"
}
metadata
object[]

Custom key/value pairs you want to attach to the customer. Maximum 50 entries; each key ≤ 48 characters and each value ≤ 512 characters. Returned verbatim on retrieval.

Maximum array length: 50

Response

Customer updated successfully

Customer object returned by Create, Get, List, and Update endpoints.

id
string<uuid>

Yuno's unique customer identifier (UUID v4). Use this value when referencing the customer in checkout sessions, payments, enrollments, and subscriptions.

Example:

"c9d0e1f2-3a4b-5c6d-7e8f-9a0b1c2d3e4f"

merchant_customer_id
string

Echoed from the request — your unique identifier for this customer.

Example:

"cust-internal-001"

merchant_customer_created_at
string<date-time> | null

Echoed from the request, or null if not supplied.

Example:

"2024-01-15T12:34:56.123456Z"

first_name
string | null
Example:

"Maria"

last_name
string | null
Example:

"Silva"

email
string<email> | null
Example:

"maria.silva@example.com"

gender
enum<string> | null
Available options:
M,
F,
NB,
null
Example:

"F"

date_of_birth
string | null
Example:

"1990-02-28"

country
string | null
Example:

"BR"

nationality
string | null
Example:

"BR"

document
object

Customer's identification document. Both fields are required when the document object is sent. Yuno does not enforce a fixed enum on document_type; pass the local code expected by the destination payment method.

Example:
{
  "document_type": "CPF",
  "document_number": "12345678901"
}
phone
object

Customer's phone number, split into country calling code and the local number. Both fields are required when the phone object is sent.

Example:
{
  "country_code": "57",
  "number": "3132450765"
}
billing_address
object

Postal address. Used for both billing_address and shipping_address. All fields are optional, but providing as much detail as possible improves authorization rates and downstream fraud-prevention scoring.

Example:
{
  "address_line_1": "Calle 34 # 56 - 78",
  "address_line_2": "Apartamento 502, Torre I",
  "city": "Bogotá",
  "state": "Cundinamarca",
  "country": "CO",
  "zip_code": "111111",
  "neighborhood": "Chapinero"
}
shipping_address
object

Postal address. Used for both billing_address and shipping_address. All fields are optional, but providing as much detail as possible improves authorization rates and downstream fraud-prevention scoring.

Example:
{
  "address_line_1": "Calle 34 # 56 - 78",
  "address_line_2": "Apartamento 502, Torre I",
  "city": "Bogotá",
  "state": "Cundinamarca",
  "country": "CO",
  "zip_code": "111111",
  "neighborhood": "Chapinero"
}
metadata
object[] | null

Echoed from the request. Returns an empty array (or omitted) when no metadata was provided.

created_at
string<date-time>

Server-generated ISO 8601 timestamp of when the customer record was created.

Example:

"2026-03-01T10:00:00.000000Z"

updated_at
string<date-time>

Server-generated ISO 8601 timestamp of the last update to the customer record.

Example:

"2026-03-01T10:00:00.000000Z"