Delete a webhook
Remove a webhook endpoint.
Deletes the endpoint permanently. In-flight deliveries finish their retry schedule; no new events are dispatched to it.
DELETE /v3/webhooks/{id}
Responses
| Status | Description |
|---|---|
200 | Deleted. { message: "Webhook deleted" }. |
401 | Missing or invalid API key. |
404 | No webhook with this id on your account. |
Code examples
cURL
curl -X DELETE https://api.wemail.io/v3/webhooks/{id} \
-H "Authorization: Bearer afn_live_…"Node.js
const res = await fetch("https://api.wemail.io/v3/webhooks/{id}", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
},
});
const data = await res.json();Python
import os, requests
r = requests.delete(
"https://api.wemail.io/v3/webhooks/{id}",
headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
)
data = r.json()