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

StatusDescription
200Deleted. { message: "Webhook deleted" }.
401Missing or invalid API key.
404No 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()