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

# Atualizar Cliente

> Atualize os dados de um cliente para o seu perfil, sem afetar outros sellers

## Visão Geral

Atualiza campos do cliente para o **seu** perfil (`CustomerSellerProfile`). Só os campos enviados mudam — atualização parcial. Outros sellers vinculados ao mesmo cliente global não são afetados: cada um mantém sua própria visão de nome, e-mail e telefone.

## Headers

<ParamField header="Authorization" type="string" required>
  Sua chave de API (`Bearer sk_live_...`)
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

## Path Parameters

<ParamField path="uuid" type="string" required>
  UUID do cliente
</ParamField>

## Request Body

Todos os campos são opcionais — envie apenas o que quer mudar.

<ParamField body="name" type="string">
  Nome completo
</ParamField>

<ParamField body="email" type="string">
  E-mail válido
</ParamField>

<ParamField body="phone" type="string">
  Telefone com DDD, 10 ou 11 dígitos
</ParamField>

<ParamField body="document" type="string">
  CPF (11 dígitos) ou CNPJ (14 dígitos), apenas números
</ParamField>

<ParamField body="personType" type="string">
  `fisica` ou `juridica`
</ParamField>

<ParamField body="zipCode" type="string">
  CEP com 8 dígitos
</ParamField>

<ParamField body="street" type="string">
  Logradouro
</ParamField>

<ParamField body="number" type="string">
  Número do endereço
</ParamField>

<ParamField body="complement" type="string">
  Complemento
</ParamField>

<ParamField body="neighborhood" type="string">
  Bairro
</ParamField>

<ParamField body="city" type="string">
  Cidade
</ParamField>

<ParamField body="state" type="string">
  Sigla do estado, 2 letras maiúsculas
</ParamField>

<Note>
  Para mudar apenas o e-mail de cobrança **sem** alterar o e-mail de contato do cliente, use [`PATCH /api/v1/customers/{uuid}/billing-email-override`](/api-reference/clientes/definir-email-cobranca) em vez deste endpoint.
</Note>

## Exemplo de Requisição

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://garu.com.br/api/v1/customers/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
    -H "Authorization: Bearer sk_live_sua_chave_api" \
    -H "Content-Type: application/json" \
    -d '{ "name": "Maria Santos" }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    `https://garu.com.br/api/v1/customers/${customerUuid}`,
    {
      method: 'PATCH',
      headers: {
        Authorization: `Bearer ${process.env.GARU_API_KEY}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({ name: 'Maria Santos' })
    }
  );

  const customer = await response.json();
  ```

  ```python Python theme={null}
  import os
  import requests

  response = requests.patch(
      f"https://garu.com.br/api/v1/customers/{customer_uuid}",
      headers={
          "Authorization": f"Bearer {os.environ['GARU_API_KEY']}",
          "Content-Type": "application/json",
      },
      json={"name": "Maria Santos"},
  )

  customer = response.json()
  ```
</CodeGroup>

## Resposta de Sucesso (200 OK)

```json theme={null}
{
  "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "Maria Santos",
  "email": "maria@exemplo.com.br",
  "phone": "11987654321",
  "document": "12345678909",
  "personType": "fisica",
  "zipCode": null,
  "street": null,
  "number": null,
  "complement": null,
  "neighborhood": null,
  "city": null,
  "state": null,
  "billingEmail": "maria@exemplo.com.br",
  "hasBillingEmailOverride": false,
  "createdAt": "2026-01-15T10:30:00.000Z",
  "updatedAt": "2026-01-15T11:00:00.000Z"
}
```

## Erros

| Código | Quando acontece                                                   |
| ------ | ----------------------------------------------------------------- |
| `400`  | Dados inválidos                                                   |
| `401`  | Chave de API ausente ou inválida                                  |
| `404`  | O cliente não existe ou não está vinculado à conta da chave usada |
