Appearance
Delete a webhook
Remove a webhook. Events stop immediately.
http
DELETE /v1/webhooks/{id}Requires a Full access API key.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The webhook id. |
Example
bash
curl -X DELETE "https://api.sendgrail.com/v1/webhooks/$WEBHOOK_ID" \
-H "Authorization: Bearer $SENDGRAIL_API_KEY"js
await fetch(`https://api.sendgrail.com/v1/webhooks/${id}`, {
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.SENDGRAIL_API_KEY}` },
});Response
json
{
"object": "webhook",
"id": "4dd369bc-aa82-4ff3-97de-514ae3000ee0",
"deleted": true
}Delete or disable?
Deleting is permanent: the id and its signing secret are gone, and re-creating the webhook gives you a new id and a new secret to verify against. If you only want to stop events for a while — a deploy, a broken handler — set status to disabled instead and keep the same id and secret.