Delete a Webhook
This reference documents the webhook deletion endpoint. Per the supplied reference, a successful call returns 204 with no response body, and the webhook receives no further event deliveries, including retries that were already queued. A webhook that has been revoked can still be deleted. The Idempotency-Key and X-On-Behalf-Of headers have no effect on this request. The behavior described here reflects the supplied source reference and should be confirmed against the owner's current API contract before publication.
Request contract
Use the DELETE method against the webhook resource path. The only required input is the webhook identifier in the path. There is no request body. Authentication uses a bearer API key, and the key must carry the webhooks:write scope. The key owner's role can further limit what the key is allowed to do.
Field and control map
The table below summarizes the inputs and behaviors that matter when calling this endpoint. It is a reader aid, not a replacement for the exact request and response modules delivered with this page.
Success and error outcomes
A 204 response means the webhook was deleted and no body is returned. The supplied reference associates a 403 FORBIDDEN response with the case where the key owner no longer exists, and a 404 WEBHOOK_NOT_FOUND response with a webhook ID that did not match a webhook. The endpoint also documents 400, 401, 429, and 500 responses through the shared error envelope.
Worked example
The supplied cURL example targets the example webhook ID wh_3f1c2b9e-8a47-4d5e-9c61-2b7f0e4a1d93. Replace that ID with the real webhook identifier from your own account. The Authorization header must carry a valid bearer token. The example below is the exact supplied request module.
Decision checklist before deleting
Use this checklist to confirm the call is safe and to interpret the result correctly. First, confirm the webhook ID belongs to the intended registration. Second, confirm the API key has webhooks:write and that the key owner still exists. Third, confirm you no longer need event deliveries from this endpoint, because the supplied reference states deletion stops all deliveries including pending retries. Fourth, treat a 404 as an ID mismatch rather than a permissions problem. Fifth, treat a 403 as a key-owner or authorization problem rather than a missing webhook.
Why 403 and 404 mean different things here
The supplied reference associates a 404 WEBHOOK_NOT_FOUND response with the path parameter: the ID does not resolve to a webhook. It associates a 403 FORBIDDEN response with the caller: the key owner no longer exists. These are not interchangeable. If you receive 403, changing the webhook ID will not help. If you receive 404, checking the key scope will not help. Resolve the correct layer before retrying.
| Item | Value | Notes |
|---|---|---|
| Method | DELETE | No request body |
| Path | /v2/webhooks/{id} | id is required |
| Path parameter | id (string) | webhook ID |
| Scope | webhooks:write | Required on the API key |
| Auth header | Authorization: Bearer <token> | API key sent as bearer token |
| Success | 204 | Empty response body |
| Documented error | 403 FORBIDDEN | Key owner no longer exists |
| Documented error | 404 WEBHOOK_NOT_FOUND | Webhook ID not found |
| Ignored header | Idempotency-Key | No effect on this request |
| Ignored header | X-On-Behalf-Of | No effect on this request |
This table is a reader aid summarizing the supplied endpoint reference. The exact request and response modules delivered with this page remain authoritative.
Frequently asked questions
What does a successful delete return?
A successful call returns 204 with no response body. The webhook is removed and no further deliveries are sent to it, including pending retries.
Can a revoked webhook still be deleted?
Yes. A revoked webhook can be deleted. Revocation does not block the delete operation.
Do Idempotency-Key and X-On-Behalf-Of affect this request?
No. Both headers are ignored for this endpoint.
What should I check after a 404 WEBHOOK_NOT_FOUND response?
Check the webhook ID in the path. The documented resolution is to verify the webhook ID.
What does a 403 FORBIDDEN response mean here?
The supplied reference associates 403 FORBIDDEN with the key owner no longer existing. It is not the same as a missing webhook ID.
Where can I get help with this endpoint?
For API questions, use the support channel published on this site's developer or contact page. Confirm the current address there before sending account-specific details, and avoid including API keys or other secrets in a support message.
curl -X DELETE "$API_BASE_URL/v2/webhooks/wh_3f1c2b9e-8a47-4d5e-9c61-2b7f0e4a1d93" \
-H "Authorization: Bearer "{
"error": {
"code": "VALIDATION_ERROR",
"name": "ValidationError",
"description": "Example post details.",
"resolution": "Fix the fields listed in details.fields and send the request again.",
"requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef",
"details": {
"fields": [
{
"path": "startDate",
"message": "\"startDate\" is required"
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"name": "Unauthorized",
"description": "Example post details.",
"resolution": "Send a valid API key in the Authorization header as Bearer followed by the full vt_live_ key.",
"requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef"
}
}{
"error": {
"code": "INSUFFICIENT_SCOPE",
"name": "InsufficientScope",
"description": "Example post details.",
"resolution": "Add the scopes listed in details.requiredScopes to the key in the OnlyLeave dashboard.",
"requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef",
"details": {
"requiredScopes": [
"leaves:write"
]
}
}
}{
"error": {
"code": "WEBHOOK_NOT_FOUND",
"name": "Webhook not found",
"description": "Example post details.",
"resolution": "Check the webhook ID.",
"requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef"
}
}{
"error": {
"code": "RATE_LIMITED",
"name": "RateLimited",
"description": "Example post details.",
"resolution": "Wait a few seconds and retry, using the same Idempotency-Key for writes.",
"requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"name": "InternalError",
"description": "Example post details.",
"resolution": "Retry later, and if it keeps happening, contact OnlyLeave support and quote the requestId.",
"requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef"
}
}id
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| id | string | Yes | webhook ID. |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Error envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog . | ||
| response.error | object | Yes | ||
| response.error.code | string | Yes | stable machine-readable error code | |
| response.error.name | string | Yes | short human-readable error name | |
| response.error.description | string | Yes | what went wrong | |
| response.error.resolution | string | Yes | how to fix the problem | |
| response.error.requestId | string | Yes | request ID, include it when contacting support | |
| response.error.details | object | No | optional additional information specific to the error code | |
| response.error.details.[key: string] | any | No |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Error envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog . | ||
| response.error | object | Yes | ||
| response.error.code | string | Yes | stable machine-readable error code | |
| response.error.name | string | Yes | short human-readable error name | |
| response.error.description | string | Yes | what went wrong | |
| response.error.resolution | string | Yes | how to fix the problem | |
| response.error.requestId | string | Yes | request ID, include it when contacting support | |
| response.error.details | object | No | optional additional information specific to the error code | |
| response.error.details.[key: string] | any | No |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Error envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog . | ||
| response.error | object | Yes | ||
| response.error.code | string | Yes | stable machine-readable error code | |
| response.error.name | string | Yes | short human-readable error name | |
| response.error.description | string | Yes | what went wrong | |
| response.error.resolution | string | Yes | how to fix the problem | |
| response.error.requestId | string | Yes | request ID, include it when contacting support | |
| response.error.details | object | No | optional additional information specific to the error code | |
| response.error.details.[key: string] | any | No |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Error envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog . | ||
| response.error | object | Yes | ||
| response.error.code | string | Yes | stable machine-readable error code | |
| response.error.name | string | Yes | short human-readable error name | |
| response.error.description | string | Yes | what went wrong | |
| response.error.resolution | string | Yes | how to fix the problem | |
| response.error.requestId | string | Yes | request ID, include it when contacting support | |
| response.error.details | object | No | optional additional information specific to the error code | |
| response.error.details.[key: string] | any | No |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Error envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog . | ||
| response.error | object | Yes | ||
| response.error.code | string | Yes | stable machine-readable error code | |
| response.error.name | string | Yes | short human-readable error name | |
| response.error.description | string | Yes | what went wrong | |
| response.error.resolution | string | Yes | how to fix the problem | |
| response.error.requestId | string | Yes | request ID, include it when contacting support | |
| response.error.details | object | No | optional additional information specific to the error code | |
| response.error.details.[key: string] | any | No |
response
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| response | object | Error envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog . | ||
| response.error | object | Yes | ||
| response.error.code | string | Yes | stable machine-readable error code | |
| response.error.name | string | Yes | short human-readable error name | |
| response.error.description | string | Yes | what went wrong | |
| response.error.resolution | string | Yes | how to fix the problem | |
| response.error.requestId | string | Yes | request ID, include it when contacting support | |
| response.error.details | object | No | optional additional information specific to the error code | |
| response.error.details.[key: string] | any | No |