Skip to content

Pause a webhook with the REST API v2 endpoint

Use this endpoint when you need to stop normal webhook delivery for one webhook without deleting it. The operation is a POST to the webhook-specific pause route, takes no body, and returns the webhook in its paused state.

Request: POST with a webhook ID in the path

Send a POST request to /v2/webhooks/{id}/pause. The id path parameter is a required string identifying the webhook. There is no request body, and the Idempotency-Key and X-On-Behalf-Of headers are ignored for this call, so do not rely on them to make the operation idempotent or delegated.

Authorization and scope

Authorize the request with a bearer API key carrying the webhooks:write scope. The key is sent as an Authorization Bearer token. If the key lacks the required scope, expect an insufficient-scope error; if the key is missing, malformed, unrecognized, or revoked, authentication fails before the pause can be applied. The key owner's role can also limit what the key is allowed to do.

Successful response: confirm the paused state

On success the endpoint returns HTTP 200 with the webhook object. Check status for paused and pausedReason for manual, and use pausedAt to record when the pause took effect. The returned object also carries the webhook ID, delivery URL, description, subscribed events, revocation fields, owner ID, secret prefix, most recent delivery, and creation and update timestamps. In the captured example, the webhook is subscribed to leave.approved and leave.cancelled, its last delivery succeeded, and revokedAt and revocationReason are null.

Delivery behaviour while paused

Pausing is not a queueing mechanism. Events that occur while the webhook is paused are not sent later, and pending retries are skipped rather than held for resumption. Test deliveries still go through, which makes them useful for checking the endpoint while normal delivery remains stopped. When you are ready to receive new events again, use the separate resume operation; only events after that call are sent.

Pre-flight and post-call checklist

Before calling, confirm three things: you have the correct webhook ID, your key has webhooks:write, and you accept that events during the pause will not be backfilled. After calling, confirm the 200 response shows paused and manual, then decide whether to send a test delivery to verify the endpoint. If you need to restore delivery, resume the webhook; if the webhook was revoked, the pause endpoint returns 409 WEBHOOK_REVOKED and the resolution is to delete it and create a new one.

Errors to handle

Beyond the endpoint-specific failures, the documented response set includes 400 validation errors, 401 unauthorized, 403 forbidden, 404 not found, 409 revoked, 429 rate limited, and 500 internal errors, each returned in the shared error envelope with a stable code, human-readable name, description, resolution, and requestId. For this endpoint, 403 FORBIDDEN means the key owner no longer exists, 404 uses WEBHOOK_NOT_FOUND, and 409 uses WEBHOOK_REVOKED. For rate limiting, wait and retry; for internal errors, retry later and quote the requestId if the problem persists.

Pause webhook checklist
CheckWhat to verify
Webhook IDThe id path value matches the intended webhook, not a revoked or deleted one.
ScopeThe bearer key includes webhooks:write.
Body and headersNo body is sent; Idempotency-Key and X-On-Behalf-Of have no effect.
ResponseHTTP 200 returns status paused with pausedReason manual.
Delivery expectationEvents during the pause are not backfilled, pending retries are skipped, and test deliveries still work.

Use as a pre-flight and verification checklist for this endpoint only.

Frequently asked questions

Does pausing a webhook need a request body?

No. There is no request body for this operation. The only required input is the webhook identifier supplied in the path, and the call needs bearer authorization with the webhooks:write scope.

What happens to events and retries while a webhook is paused?

Events occurring during the pause are not delivered afterwards, and retries that were pending are skipped. Test deliveries are the exception and continue to be sent.

How do I know the pause succeeded, and which errors are specific to this endpoint?

A successful call returns the updated webhook with status paused and pausedReason manual. Specific failures include 403 FORBIDDEN when the key owner no longer exists, 404 WEBHOOK_NOT_FOUND, and 409 WEBHOOK_REVOKED when the webhook has been revoked.

curl -X POST "$API_BASE_URL/v2/webhooks/wh_3f1c2b9e-8a47-4d5e-9c61-2b7f0e4a1d93/pause" \
  -H "Authorization: Bearer "
{
  "data": {
    "webhookId": "wh_3f1c2b9e-8a47-4d5e-9c61-2b7f0e4a1d93",
    "url": "https://example.com/vacation-tracker/webhooks",
    "description": "Example post details.",
    "events": [
      "leave.approved",
      "leave.cancelled"
    ],
    "status": "paused",
    "pausedReason": "manual",
    "pausedAt": "2026-09-24T07:30:00.000Z",
    "revokedAt": null,
    "revocationReason": null,
    "ownerId": "user-63b17e97-d38b-4586-8498-bb4f5d2e2c14",
    "secretPrefix": "whsec_AbCd",
    "lastDelivery": {
      "deliveryId": "dlv_1790157600000_8a47c61e2b7f4d5e9c613f1c2b9e1d93",
      "eventName": "leave.approved",
      "status": "SUCCEEDED",
      "responseStatus": 200,
      "at": "2026-09-23T10:00:00.000Z"
    },
    "createdAt": "2026-09-01T08:00:00.000Z",
    "updatedAt": "2026-09-24T07:30:00.000Z"
  }
}
{
  "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": "WEBHOOK_REVOKED",
    "name": "Webhook revoked",
    "description": "Example post details.",
    "resolution": "Delete the webhook and create a new one.",
    "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

FieldTypeRequiredDescriptionConstraints
idstringYeswebhook ID.

response

FieldTypeRequiredDescriptionConstraints
responseobject
response.dataobjectNo
response.data.webhookIdstringYeswebhook ID
response.data.urlstringYesthe HTTPS URL deliveries are sent toFormat: uri
response.data.descriptionstring | nullNoa description to help you recognize the webhook
response.data.description[variant1]stringa description to help you recognize the webhook
response.data.description[variant2]nulla description to help you recognize the webhook
response.data.eventsarray<WebhookEventType>Yesthe event types sent to this webhook
response.data.events[]stringthe event type. webhook.test is sent only by test deliveries and cannot be subscribed to.Allowed values: $72
response.data.statusstringYesactive webhooks receive events; paused and revoked webhooks do notAllowed values: "active" | "paused" | "revoked"
response.data.pausedReasonstring | nullNowhy the webhook is paused. manual means it was paused with the API or the dashboard, delivery-failures means every delivery failed for 72 hours, endpoint-gone means your endpoint returned 410.Allowed values: "manual" | "delivery-failures" | "endpoint-gone" | null
response.data.pausedReason[variant1]stringwhy the webhook is paused. manual means it was paused with the API or the dashboard, delivery-failures means every delivery failed for 72 hours, endpoint-gone means your endpoint returned 410.Allowed values: "manual" | "delivery-failures" | "endpoint-gone" | null
response.data.pausedReason[variant2]nullwhy the webhook is paused. manual means it was paused with the API or the dashboard, delivery-failures means every delivery failed for 72 hours, endpoint-gone means your endpoint returned 410."manual" | "delivery-failures" | "endpoint-gone" | null
response.data.pausedAtstring | nullNoa timestamp in the ISO 8601 format, set while the webhook is pauseddate-time
response.data.pausedAt[variant1]stringa timestamp in the ISO 8601 format, set while the webhook is pauseddate-time
response.data.pausedAt[variant2]nulla timestamp in the ISO 8601 format, set while the webhook is pauseddate-time
response.data.revokedAtstring | nullNoa timestamp in the ISO 8601 format, set when the webhook is revokeddate-time
response.data.revokedAt[variant1]stringa timestamp in the ISO 8601 format, set when the webhook is revokeddate-time
response.data.revokedAt[variant2]nulla timestamp in the ISO 8601 format, set when the webhook is revokeddate-time
response.data.revocationReasonstring | nullNowhy the webhook was revoked"manual" | "owner_permissions_reduced" | "owner_deactivated" | "owner_deleted" | null
response.data.revocationReason[variant1]stringwhy the webhook was revoked"manual" | "owner_permissions_reduced" | "owner_deactivated" | "owner_deleted" | null
response.data.revocationReason[variant2]nullwhy the webhook was revoked"manual" | "owner_permissions_reduced" | "owner_deactivated" | "owner_deleted" | null
response.data.ownerIdstringYesthe ID of the user who owns the webhook. Events are filtered by this user's current permissions.
response.data.secretPrefixstringYesthe first 10 characters of the signing secret, to help you tell secrets apart
response.data.lastDeliveryWebhookLastDelivery | nullNothe most recent delivery, null before the first delivery
response.data.lastDelivery[variant1]objectthe most recent delivery, null before the first delivery
response.data.lastDelivery[variant1].deliveryIdstringYesdelivery ID, the same as the VT-Delivery-Id header
response.data.lastDelivery[variant1].eventNamestringYesthe event type. webhook.test is sent only by test deliveries and cannot be subscribed to.Allowed values: $72
response.data.lastDelivery[variant1].statusstringYesdelivery status. SKIPPED means the webhook was paused, revoked or deleted before the delivery was sent."PENDING" | "RETRYING" | "SUCCEEDED" | "FAILED" | "SKIPPED"
response.data.lastDelivery[variant1].responseStatusintegerNothe HTTP status your endpoint returned on the latest attempt, absent when no response was received
response.data.lastDelivery[variant1].atstringYesa timestamp in the ISO 8601 format of the latest attemptdate-time
response.data.lastDelivery[variant2]nullthe most recent delivery, null before the first delivery
response.data.createdAtstringYesa timestamp in the ISO 8601 formatdate-time
response.data.updatedAtstringYesa timestamp in the ISO 8601 formatdate-time

response

FieldTypeRequiredDescriptionConstraints
responseobjectError envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog .
response.errorobjectYes
response.error.codestringYesstable machine-readable error code
response.error.namestringYesshort human-readable error name
response.error.descriptionstringYeswhat went wrong
response.error.resolutionstringYeshow to fix the problem
response.error.requestIdstringYesrequest ID, include it when contacting support
response.error.detailsobjectNooptional additional information specific to the error code
response.error.details.[key: string]anyNo

response

FieldTypeRequiredDescriptionConstraints
responseobjectError envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog .
response.errorobjectYes
response.error.codestringYesstable machine-readable error code
response.error.namestringYesshort human-readable error name
response.error.descriptionstringYeswhat went wrong
response.error.resolutionstringYeshow to fix the problem
response.error.requestIdstringYesrequest ID, include it when contacting support
response.error.detailsobjectNooptional additional information specific to the error code
response.error.details.[key: string]anyNo

response

FieldTypeRequiredDescriptionConstraints
responseobjectError envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog .
response.errorobjectYes
response.error.codestringYesstable machine-readable error code
response.error.namestringYesshort human-readable error name
response.error.descriptionstringYeswhat went wrong
response.error.resolutionstringYeshow to fix the problem
response.error.requestIdstringYesrequest ID, include it when contacting support
response.error.detailsobjectNooptional additional information specific to the error code
response.error.details.[key: string]anyNo

response

FieldTypeRequiredDescriptionConstraints
responseobjectError envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog .
response.errorobjectYes
response.error.codestringYesstable machine-readable error code
response.error.namestringYesshort human-readable error name
response.error.descriptionstringYeswhat went wrong
response.error.resolutionstringYeshow to fix the problem
response.error.requestIdstringYesrequest ID, include it when contacting support
response.error.detailsobjectNooptional additional information specific to the error code
response.error.details.[key: string]anyNo

response

FieldTypeRequiredDescriptionConstraints
responseobjectError envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog .
response.errorobjectYes
response.error.codestringYesstable machine-readable error code
response.error.namestringYesshort human-readable error name
response.error.descriptionstringYeswhat went wrong
response.error.resolutionstringYeshow to fix the problem
response.error.requestIdstringYesrequest ID, include it when contacting support
response.error.detailsobjectNooptional additional information specific to the error code
response.error.details.[key: string]anyNo

response

FieldTypeRequiredDescriptionConstraints
responseobjectError envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog .
response.errorobjectYes
response.error.codestringYesstable machine-readable error code
response.error.namestringYesshort human-readable error name
response.error.descriptionstringYeswhat went wrong
response.error.resolutionstringYeshow to fix the problem
response.error.requestIdstringYesrequest ID, include it when contacting support
response.error.detailsobjectNooptional additional information specific to the error code
response.error.details.[key: string]anyNo

response

FieldTypeRequiredDescriptionConstraints
responseobjectError envelope returned by every endpoint, including authentication and rate limit errors. error.code is one of the codes in x-error-catalog .
response.errorobjectYes
response.error.codestringYesstable machine-readable error code
response.error.namestringYesshort human-readable error name
response.error.descriptionstringYeswhat went wrong
response.error.resolutionstringYeshow to fix the problem
response.error.requestIdstringYesrequest ID, include it when contacting support
response.error.detailsobjectNooptional additional information specific to the error code
response.error.details.[key: string]anyNo