# Eliminar un webhook

Source: https://won.dev/es/docs/email/webhooks-delete

`DELETE https://api.won.dev/v1/webhooks/{id}`

Deja de enviar eventos a un webhook y lo elimina, junto con las entregas que seguían en espera. Los eventos en sí se siguen pudiendo leer con `GET /events`. Gratis.

- **Cobro:** Gratis.

Una clave de prueba (`won_test_...`) ejecuta esto en el [sandbox](/es/docs/email#sandbox): no se envía ni se cobra nada.

## Parámetros [#parameters]

`id` va en la ruta. Las solicitudes `DELETE` también aceptan el encabezado `Idempotency-Key`; consulta [Enviar una solicitud dos veces](/es/docs/email#idempotency).

| Parámetro | Tipo | Obligatorio | Descripción (texto original de la API) |
| --- | --- | --- | --- |
| `id` | string | sí | Webhook ID, such as `whk_2m9x7p1q8w3e5r4k`. |

## Respuesta [#response]

Los errores se describen en [Errores](/es/docs/errors).

| Campo | Tipo | Descripción (texto original de la API) |
| --- | --- | --- |
| `data` | object | The webhook that was deleted. |
| `data.id` | string | The webhook that was deleted. |
| `data.deleted` | boolean | Always true: the webhook is gone. |
| `notice` | string \| null | A plain sentence when there is something to know about this answer. Null otherwise. |
| `usage` | object | Nothing is charged here. The balance, for reference. |
| `usage.cost` | number | What this call cost, in US dollars. |
| `usage.balance` | number | The balance left after this call, in US dollars. |
| `usage.replayed` | boolean | True when this is a repeat of a request from the last 24 hours. Repeats are free. |

## Ejemplo [#example]

```bash
curl -X DELETE "https://api.won.dev/v1/webhooks/whk_2m9x7p1q8w3e5r4k" \
  -H "Authorization: Bearer $WON_API_KEY"
```

```json
{
  "data": {
    "id": "whk_2m9x7p1q8w3e5r4k",
    "deleted": true
  },
  "notice": null,
  "usage": {
    "cost": 0,
    "balance": 48.08,
    "replayed": false
  }
}
```