> For the complete index of the 402pay docs, see [llms.txt](https://developer.402pay.co/llms.txt).

# Delete a webhook endpoint

Remove an endpoint and stop its deliveries, including pending retries.

`DELETE https://dash.402pay.co/api/v1/webhooks/{id}`

The endpoint stops receiving events at once, including retries still waiting.

### Path

- `id` (string, required): The webhook endpoint's ID, such as `whk_GFAKLrE8wkBwF4WL`.

### Errors

- 404 `not_found` No webhook endpoint with that ID belongs to your business.

Any request can also fail on its key or its body. See [errors](https://developer.402pay.co/api/errors.md).

Request, cURL:

```bash
curl -X DELETE "https://dash.402pay.co/api/v1/webhooks/whk_GFAKLrE8wkBwF4WL" \
  -H "Authorization: Bearer $PAY402_SECRET_KEY"
```

Request, Node.js:

```js
const response = await fetch("https://dash.402pay.co/api/v1/webhooks/whk_GFAKLrE8wkBwF4WL", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.PAY402_SECRET_KEY}`,
  },
});
const { data } = await response.json();
```

Request, Python:

```python
import os

import requests

response = requests.delete(
    "https://dash.402pay.co/api/v1/webhooks/whk_GFAKLrE8wkBwF4WL",
    headers={
        "Authorization": f"Bearer {os.environ['PAY402_SECRET_KEY']}",
    },
)
data = response.json()["data"]
```

Response, 200 OK:

```json
{
  "data": {
    "id": "whk_GFAKLrE8wkBwF4WL",
    "kind": "webhook",
    "deleted": true
  }
}
```
