Skip to main content
import { createClient } from "@mailsai/sdk";

const client = createClient(); // reads MAILS_API_KEY

const result = await client.webhooks.remove(
  "whe_01JZX8K3M9Q4P7VN2YB6RTDC0E",
);
console.log(result);
{
  "id": "whe_01JZX8K3M9Q4P7VN2YB6RTDC0E",
  "deleted_at": "2026-10-04T12:00:00.000Z"
}

Delete a webhook endpoint

Deletes the endpoint and its delivery history.
DELETE/v1/webhooks/{id}scope · manage
import { createClient } from "@mailsai/sdk";

const client = createClient(); // reads MAILS_API_KEY

const result = await client.webhooks.remove(
  "whe_01JZX8K3M9Q4P7VN2YB6RTDC0E",
);
console.log(result);
{
  "id": "whe_01JZX8K3M9Q4P7VN2YB6RTDC0E",
  "deleted_at": "2026-10-04T12:00:00.000Z"
}

Path Parameters

idstringrequired

Webhook endpoint id.

Response

idstring

Id of the deleted endpoint (whe_…): the id in the path.

deleted_atstring

When the endpoint was deleted: the time of this request. Its delivery history was deleted with it.

Was this page helpful?