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

# Excluir cliente

> Remove um cliente da conta

Exclui o cliente (exclusão lógica). Ele deixa de aparecer em consultas e listagens; cobranças que já o referenciam continuam apontando para ele.

Permissão: `customer.write`. Apenas chave secreta (`sk_…`).

<Note>
  Os exemplos usam o sandbox (`https://api.upag.dev/v1`). Em produção use `https://api.upag.io/v1` com `sk_live_…`.
</Note>

## Endpoint

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE https://api.upag.dev/v1/customers/8c1f0a26-5d3b-4f1e-9c72-1a4e6b9d0f83 \
    -H "Authorization: Bearer sk_test_your_api_key"
  ```

  ```javascript Node.js SDK theme={null}
  import { Upag } from 'upag';

  const upag = new Upag('sk_test_your_api_key');

  await upag.customers.delete('8c1f0a26-5d3b-4f1e-9c72-1a4e6b9d0f83');
  ```
</CodeGroup>

## Parâmetros

<ParamField path="customerId" type="string (uuid)" required>
  ID do cliente.
</ParamField>

## Resposta

`204 No Content`, sem corpo.

## Erros

| Status | Mensagem | Causa |
| - | - | - |
| `404` | `Customer not found` | Cliente inexistente, já excluído (a segunda exclusão retorna `404`) ou de outra conta |
| `422` | `VALIDATION_FAILED` | `customerId` não é UUID |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.