delete(id: string, options?: RequestScope): Promise<DeletedWebhookResource>Soft-deletes the endpoint. It leaves list, every other method here answers 404 for it, and the id is never reused. The signing secret is destroyed with the row and the delivery history goes with it, so export anything you need for an audit trail before you call this.
There is no undo. If the goal is only to stop deliveries, call update with enabled: false instead and keep the secret and the log.
One ordering quirk to expect: webhook.deleted is emitted before the row is removed, so an endpoint subscribed to webhook.deleted gets a delivery queued for its own deletion, which the worker then marks failed because the endpoint is already gone. That failure is normal and not a fault in your receiver.
Example
const audit = await envless.webhooks.listAllDeliveries('0194f2b1-9c3a-7c21-8f0e-2b6d4a1c5e90')
const deleted = await envless.webhooks.delete('0194f2b1-9c3a-7c21-8f0e-2b6d4a1c5e90')
console.log(audit.length, deleted.deleted)Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Endpoint id, ids only and no slug form. |
options.signal | AbortSignal | No | Cancels the request. |
Returns
DeletedWebhookResource with the id and a deleted flag.
Worth knowing
- Not idempotent: a second call on the same id is 404
webhook.not_found. - Deleting frees a slot against the 20 endpoint cap immediately.
Required scopes
webhooks:write
Underlying endpoint
DELETE /webhooks/{id}
Request and response schema, every error code, and a live playground.
In Python
envless.webhooks.delete()
The same method in envless-sdk, the Python SDK, with the same request, retries and errors.
In Ruby
Envless.webhooks.delete
The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.
In PHP
$envless->webhooks->delete()
The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.