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

# Excluir um endpoint de webhook

> Remove um endpoint e para as entregas.

Remove um `webhook_endpoint`. As entregas param imediatamente: o endpoint some
das listagens, não pode mais ser consultado e não recebe novos eventos. O
histórico de entregas já feitas continua visível no dashboard.

Este endpoint aceita [`Idempotency-Key`](/api-reference/idempotency).

## Autenticação

Use a API key da organização com escopo `write`. A API key de plataforma não
gerencia endpoints e o header `Organization` não é aceito neste recurso.

## Parâmetros de caminho

<ParamField path="id" type="string" required>
  ID do endpoint (`we_*`).
</ParamField>

<RequestExample>
  ```bash cURL theme={"theme":"css-variables"}
  curl -X DELETE "https://api.chargefy.io/v1/webhook-endpoints/we_JR2fKUgGLhzjpyaU" \
    -H "Authorization: Bearer {{API_KEY}}"
  ```
</RequestExample>

## Resposta

`200 OK` com o objeto curto de remoção.

| Campo     | Tipo      | Observação                  |
| --------- | --------- | --------------------------- |
| `id`      | `string`  | ID do endpoint removido     |
| `object`  | `string`  | Sempre `"webhook_endpoint"` |
| `deleted` | `boolean` | Sempre `true`               |

<ResponseExample>
  ```json 200 theme={"theme":"css-variables"}
  {
    "id": "we_JR2fKUgGLhzjpyaU",
    "object": "webhook_endpoint",
    "deleted": true
  }
  ```

  ```json 401 theme={"theme":"css-variables"}
  {
    "error": {
      "code": "authentication_failed",
      "message": "Unauthorized — invalid api key",
      "type": "authentication_error"
    }
  }
  ```

  ```json 404 theme={"theme":"css-variables"}
  {
    "error": {
      "code": "resource_missing",
      "message": "Webhook endpoint not found",
      "type": "invalid_request_error"
    }
  }
  ```
</ResponseExample>

## Erros

| Status | Quando                                                                       |
| ------ | ---------------------------------------------------------------------------- |
| `401`  | Credencial ausente, inválida, revogada ou expirada.                          |
| `404`  | Endpoint não existe nesta organização ou neste ambiente, ou já foi removido. |
