Skip to content

List webhooks

Use GET /v2/webhooks to enumerate the webhooks a given API key can see. The response is paginated and includes each webhook's status, secret prefix and most recent delivery, but never the signing secret itself.

Scope and visibility

The endpoint requires the webhooks:read scope. The API key is sent as Authorization: Bearer vt_live_<secret> in the header.

The result set is determined by the person who owns the API key, not by the key credential. If that owner is an admin, the call returns all webhooks registered in the company. If the owner is any other user, only the webhooks that user owns come back. Since visibility is anchored to the key owner, sending X-On-Behalf-Of does not change which webhooks are listed.

Pagination

Results are paginated at 25 webhooks per page by default. Pass limit to request up to 100 per page. A page can hold fewer webhooks even when more exist, so rely on nextToken rather than counting items.

When nextToken is present in the response, send it back with the same filters to fetch the next page. A token that was not issued by this API fails with 400 INVALID_PAGINATION_TOKEN.

Reading the response

Each webhook object carries a webhookId, url, events list, status and ownerId. The description field may be null. The secretPrefix field holds the first 10 characters of the signing secret so you can tell secrets apart; the full secret is never returned here.

Status is one of active, paused or revoked. Active webhooks receive events; paused and revoked webhooks do not. When a webhook is paused, pausedReason explains why: manual (paused via API or dashboard), delivery-failures (every delivery failed for 72 hours) or endpoint-gone (your endpoint returned 410). pausedAt records when the pause happened. When a webhook is revoked, revokedAt records when and revocationReason explains why (manual, owner_permissions_reduced, owner_deactivated or owner_deleted).

lastDelivery is null before the first delivery. Once a delivery exists, it includes deliveryId (the same value as the VT-Delivery-Id header), eventName, status (PENDING, RETRYING, SUCCEEDED, FAILED or SKIPPED), responseStatus (the HTTP status your endpoint returned on the latest attempt, absent when no response was received) and at (the timestamp of the latest attempt). SKIPPED means the webhook was paused, revoked or deleted before the delivery was sent.

Status at a glance

Use this table to decide what a returned webhook's status means before you act on it.

Errors

A 400 response means limit or nextToken is invalid. A 403 FORBIDDEN response means the key owner no longer exists. A 401 response means the API key is missing, malformed or not recognized. A 429 response means too many requests were sent in a short time. A 500 response means something went wrong on the server side.

Worked pagination example

Suppose the first call returns two webhooks and a nextToken. The first webhook is active with events leave.approved and leave.cancelled, and its lastDelivery shows SUCCEEDED with responseStatus 200. The second is paused with pausedReason endpoint-gone and its lastDelivery shows FAILED with responseStatus 410.

To fetch the next page, send the same limit and any other filters, plus the nextToken value from the response. Do not change filters between pages; the token was issued for the original query.

Webhook status and what it means
statusReceives events?Explanatory fields
activeYespausedReason, pausedAt, revokedAt and revocationReason are null
pausedNopausedReason (manual, delivery-failures or endpoint-gone) and pausedAt
revokedNorevokedAt and revocationReason (manual, owner_permissions_reduced, owner_deactivated or owner_deleted)

Field values and enum meanings are taken from the supplied contract schema; no runtime verification was performed.

Frequently asked questions

Which scope does the list webhooks endpoint require?

It requires webhooks:read. The key is sent as Authorization: Bearer vt_live_<secret> in the header.

Why do I see different webhooks than a colleague with the same key?

Visibility follows the key owner's role, not the key itself. Admins see every webhook in the company; other users see only the webhooks they own. X-On-Behalf-Of is ignored for this call.

Can I retrieve a webhook's signing secret from this endpoint?

No. The full signing secret is never returned here. secretPrefix holds the first 10 characters so you can tell secrets apart. If you lose the secret, use the rotate-secret endpoint.

How do I fetch the next page of webhooks?

When the response includes nextToken, send it back with the same filters as the previous call. A token that was not issued by this API fails with 400 INVALID_PAGINATION_TOKEN.

What does a 403 FORBIDDEN response mean here?

It means the key owner no longer exists. A 400 response instead means limit or nextToken is invalid.

What does lastDelivery tell me?

It shows the most recent delivery attempt: deliveryId, eventName, status (PENDING, RETRYING, SUCCEEDED, FAILED or SKIPPED), responseStatus (the HTTP status your endpoint returned, absent when no response was received) and at (the timestamp of the latest attempt). It is null before the first delivery.

curl -X GET "$API_BASE_URL/v2/webhooks" \
  -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": "active",
      "pausedReason": null,
      "pausedAt": null,
      "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-23T10:00:00.000Z"
    },
    {
      "webhookId": "wh_9c612b7f-0e4a-4d93-8a47-3f1c2b9e4d5e",
      "url": "https://example.com/vacation-tracker/operations",
      "description": null,
      "events": [
        "operation.completed",
        "operation.failed"
      ],
      "status": "paused",
      "pausedReason": "endpoint-gone",
      "pausedAt": "2026-09-20T12:00:00.000Z",
      "revokedAt": null,
      "revocationReason": null,
      "ownerId": "user-63b17e97-d38b-4586-8498-bb4f5d2e2c14",
      "secretPrefix": "whsec_Zy98",
      "lastDelivery": {
        "deliveryId": "dlv_1789905600000_2b7f0e4a1d934c618a473f1c2b9e4d5e",
        "eventName": "operation.completed",
        "status": "FAILED",
        "responseStatus": 410,
        "at": "2026-09-20T12:00:00.000Z"
      },
      "createdAt": "2026-08-15T09:00:00.000Z",
      "updatedAt": "2026-09-20T12:00:00.000Z"
    }
  ],
  "nextToken": "eyJjb21wYW55SWQiOiJjNmFmOWFjNiJ9"
}
{
  "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": "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"
  }
}

limit

FieldTypeRequiredDescriptionConstraints
limitintegerNothe number of webhooks to return per page, between 1 and 100, default is 25. A page can hold fewer webhooks even when more exist; rely on nextToken .25
1 <= value <= 100

nextToken

FieldTypeRequiredDescriptionConstraints
nextTokenstringNoThe nextToken returned by the previous API call. Send the same filters as in the previous call. Same semantics as the v1 nextToken parameter; a token that was not issued by this API fails with 400 INVALID_PAGINATION_TOKEN .

response

FieldTypeRequiredDescriptionConstraints
responseobject
response.dataarray<Webhook>No
response.data[]object
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: $6f
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."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: $6f
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.nextTokenstringNo

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