> ## Documentation Index
> Fetch the complete documentation index at: https://docs.v2.certopaybrasil.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Customer Fields — PATCH /api/customers/{id}

> PATCH /api/customers/{id} — Partially update a customer's details in CertoPay. Send only the fields you want to change; all others stay the same.

Use this endpoint to partially update an existing customer record. Because this is a `PATCH` request, you only need to include the fields you want to modify — all omitted fields will remain unchanged. This is ideal for correcting a phone number, updating an email address, or fixing a name without having to resend the full customer payload. Pass the customer UUID in the URL path where `{id}` appears.

## Request

<ParamField header="X-Api-Key" type="string" required>
  Your CertoPay secret API key. Include it in every request as `X-Api-Key: sk_live_sua_chave_aqui`.
</ParamField>

<ParamField path="id" type="string" required>
  The UUID of the customer to update. This is the `id` returned when the customer was created.
</ParamField>

<ParamField body="name" type="string">
  Updated full name of the customer. Omit this field to leave the name unchanged.
</ParamField>

<ParamField body="email" type="string">
  Updated email address. Omit this field to leave the email unchanged.
</ParamField>

<ParamField body="phone" type="string">
  Updated phone number in Brazilian format (e.g. `"(11) 88888-8888"`). Omit this field to leave the phone unchanged.
</ParamField>

## Response

A successful request returns **HTTP 200 OK** with the complete updated customer object, reflecting all current field values.

<ResponseField name="id" type="string">
  Unique UUID identifying the customer (unchanged).
</ResponseField>

<ResponseField name="name" type="string">
  Full name — updated if provided in the request, otherwise the previous value.
</ResponseField>

<ResponseField name="email" type="string">
  Email address — updated if provided in the request, otherwise the previous value.
</ResponseField>

<ResponseField name="document" type="string">
  CPF number (11 digits). This field cannot be changed via PATCH.
</ResponseField>

<ResponseField name="phone" type="string">
  Phone number — updated if provided in the request, otherwise the previous value.
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO 8601 timestamp of the original creation date (unchanged).
</ResponseField>

## Example

```bash theme={null}
curl -X PATCH https://v2.certopaybrasil.com/api/customers/uuid-do-customer \
  -H "X-Api-Key: sk_live_sua_chave_aqui" \
  -H "Content-Type: application/json" \
  -d '{"phone": "(11) 88888-8888"}'
```

```json 200 OK theme={null}
{
  "id": "uuid-do-customer",
  "name": "João da Silva",
  "email": "joao@email.com",
  "document": "12345678900",
  "phone": "(11) 88888-8888",
  "createdAt": "2026-06-26T10:00:00Z"
}
```
