PlatformXeDocs
Get API Key

Manage Webhooks

API reference for creating, updating, listing, deleting, dispatching to and inspecting webhook endpoints.

Create and manage webhook endpoints to receive event notifications at your HTTP endpoints. Every response uses the envelope { "success": true, "data": ... } or { "success": false, "error": { "code", "message" } }.

Routes under /api/v1/webhooks/ require the webhooks:manage scope, except POST /api/v1/webhooks/dispatch, which requires webhooks:dispatch; the bare GET / POST /api/v1/webhooks pair currently requires only an authenticated key of an active organization. A webhook that belongs to another service or is another organisation's endpoint is FORBIDDEN (403, "Not your webhook"), as v1 always answered; a missing one is NOT_FOUND. A delivery of another service or another organisation's endpoint (the delivery log, redeliver) is NOT_FOUND, like a missing one. Endpoints created with a key that has an organisation are scoped to it: a key of another organisation cannot see, change, count or dispatch to them, even under the same caller service name.

Endpoints with no organisation

An endpoint created before PlatformXe recorded organisations, and not yet assigned to one, has no organisation. Since 2026-11-17 a key with an organisation never reaches it by its caller service: it is not listed, a get, update, delete, rotate or test answers FORBIDDEN (403, rotate returns no secret), its delivery log and a redelivery of one of its deliveries answer NOT_FOUND, and a dispatch (v1 or POST /api/v1/webhooks/dispatch) does not deliver to it. Before, a key with an organisation could list, read and dispatch to it. (PlatformXe's own deliveries under its reserved caller services, such as workflow and escalation webhooks that Caldera's operators configure without an organisation, still reach those endpoints.) It does not count toward your organisation's endpoint caps either (per service and per recipient count only your organisation's own endpoints). A platform key (no organisation) still reads, changes and dispatches to it, and counts it toward its own caps. Ask Caldera support to assign the endpoint to your organisation; your key then reaches it as usual.

Event names

eventType (dispatch) and every v2 subscription entry follow one rule. An event name is:

  • a built-in PlatformXe event type (for example storage.file.uploaded), or
  • a custom.* name (for example custom.booking.created), or
  • any dotted name you define, such as booking.created or payment.refunded: two or more segments, letters, digits, _ and -, case-insensitive.

At most 200 characters. The webhook. prefix is reserved (the platform's own webhook.test). A v2 subscription may also be * (every event) or prefix.* (for example booking.*; not webhook.*). Refused: booking (one segment), booking..x, booking created, webhook.test. A v1 endpoint's events are not checked.

Some event names, event ids and recipients are reserved for events that PlatformXe itself sends. A dispatch that uses one is refused with VALIDATION_ERROR and records nothing, whatever its case or surrounding spaces. Subscriptions are not affected: * and prefix.* entries are accepted as before.

List webhooks

GET /api/v1/webhooks

QueryDescription
recipientRefExact recipient filter. Without it only the untargeted (v1) endpoints are listed
page, limitPaging (default page 1, limit 20, maximum 100)
{
  "success": true,
  "data": {
    "items": [
      {
        "id": "wh_abc123def456",
        "callerService": "lettings",
        "name": "Host 1",
        "url": "https://host-1.example.com/hooks",
        "events": ["booking.created"],
        "status": "ACTIVE",
        "engineVersion": 2,
        "recipientRef": "host:1",
        "totalDeliveries": 12,
        "successfulDeliveries": 12,
        "consecutiveFailures": 0,
        "lastTriggeredAt": "2026-10-20T10:00:00.000Z",
        "lastFailureAt": null,
        "lastFailureReason": null,
        "createdAt": "2026-10-19T09:00:00.000Z",
        "updatedAt": "2026-10-20T10:00:00.000Z"
      }
    ],
    "total": 1,
    "page": 1,
    "limit": 20
  }
}

No list or get response carries a secret.

curl "https://api.platformxe.com/api/v1/webhooks?recipientRef=host:1" \
  -H "x-api-key: $PLATFORMXE_API_KEY"

Create a webhook

POST /api/v1/webhooks -- HTTP 201

FieldTypeRequiredDescription
namestringYesAt least 3 characters
urlstringYesHTTPS endpoint URL. A v2 URL may not carry credentials and must resolve to a public address
eventsstring[]YesEvent types to subscribe to, non-empty. v2: *, prefix.* or event names
engineVersion1 | 2No2 requires recipientRef; recipientRef with 1 is refused. Without engineVersion: 1 when there is no recipientRef; with a recipientRef, the PLATFORMXE_WEBHOOK_ENGINE_DEFAULT environment variable decides (2 only when it is 2, so by default a recipientRef without engineVersion: 2 is refused). Send engineVersion: 2 explicitly
recipientRefstringv2The recipient (for example a host) this endpoint receives events for; 1-200 characters, trimmed

Recipient endpoints are exempt from the per-service endpoint cap and are capped per (service, recipientRef) instead (default 5), plus a ceiling of 50,000 recipient endpoints per service. The per-recipient and per-service caps are exact; the 50,000 ceiling can be overshot slightly by concurrent creates for different recipients. A v2 URL is checked when it is created or changed: HTTPS, no credentials, a public address, and a DNS answer within 3 seconds; otherwise URL_REFUSED.

{
  "success": true,
  "data": {
    "webhook": { "id": "wh_abc123def456", "engineVersion": 2, "recipientRef": "host:1", "status": "ACTIVE" },
    "secret": "whsec_<one-time-secret>"
  }
}

The secret is returned only here (and by rotate), for v1 and v2 alike. PlatformXe stores a v2 secret sealed and cannot show it again. Store it in your secrets manager immediately; you need it to verify signatures.

curl -X POST https://api.platformxe.com/api/v1/webhooks \
  -H "Content-Type: application/json" \
  -H "x-api-key: $PLATFORMXE_API_KEY" \
  -d '{
    "name": "Host 1",
    "url": "https://host-1.example.com/hooks",
    "events": ["booking.created"],
    "engineVersion": 2,
    "recipientRef": "host:1"
  }'

Get a webhook

GET /api/v1/webhooks/:id -- returns one webhook (the item shape above). status is ACTIVE, PAUSED or FAILING: a v2 endpoint becomes FAILING after 4 consecutive failed deliveries, still receives new events, and returns to ACTIVE on its next successful delivery. A PAUSED endpoint receives nothing.

Update a webhook

PATCH /api/v1/webhooks/:id

FieldTypeDescription
namestringUpdated display name
urlstringUpdated endpoint URL, trimmed and checked by the endpoint's engine policy
eventsstring[]Updated subscriptions (replaces the list). v2: the create rules; v1: stored as given
status"ACTIVE" | "PAUSED"Resume or pause deliveries

engineVersion and recipientRef can never change. Sending them unchanged (copy those two fields from a GET response) is accepted and ignored; status accepts only ACTIVE or PAUSED, so never send a FAILING status back; a changed value is VALIDATION_ERROR (recipientRef: null on a v2 endpoint counts as a change).

Delete a webhook

DELETE /api/v1/webhooks/:id -- responds { "deleted": true }. Pending deliveries are cancelled. While the endpoint still has deliveries of events PlatformXe itself sends in progress, the delete is refused with DELIVERY_IN_PROGRESS (409) and nothing is deleted; try again once they have been delivered or have failed.

Rotate the secret

POST /api/v1/webhooks/:id/rotate -- responds { webhook, secret } with the new secret, once. The previous secret stops verifying immediately. A key with an organisation cannot rotate an endpoint with no organisation (FORBIDDEN, no secret).

Test a webhook

POST /api/v1/webhooks/:id/test -- sends a test payload (event webhook.test); responds { success, responseStatus?, responseTimeMs?, error? }. A failed delivery is success: false in data, not an HTTP error. A v2 endpoint is tested through the same sender live deliveries use, and the test is recorded as one delivery row that is never retried and moves no endpoint counter.


Dispatch an event to one recipient

POST /api/v1/webhooks/dispatch -- scope webhooks:dispatch

FieldTypeDescription
recipientRefstringThe recipient whose v2 endpoints receive the event
eventTypestringAn event name (max 200 characters)
eventIdstring1-200 visible ASCII characters, no spaces (it is sent as the X-Webhook-Id header). Idempotent per endpoint: the same id never creates a second delivery
dataobjectThe event data (required; null is refused)

Header x-idempotency-key (optional): a repeat of the whole request answers the stored response.

{ "success": true, "data": { "targeted": 1, "created": 1 } }

targeted is the number of the recipient's v2 endpoints that subscribe to the event and are not PAUSED (ACTIVE or FAILING); created the delivery rows this call created (0 on a repeat of the same eventId). An event is never delivered to another recipient's endpoints, to untargeted (v1) endpoints or to a PAUSED endpoint.

The response is sent as soon as the delivery rows are recorded; the first attempts run after the response, and the retry sweep picks up anything they do not record. A 200 therefore means the event is recorded, not that it was delivered. Every send checks the URL again (3 second DNS bound); a refusal is a failed attempt with reason URL_REFUSED, retried like any other failure.

Besides the codes below, dispatch can answer CONFLICT (409, the same x-idempotency-key is still in flight), RATE_LIMITED (429, with Retry-After) and IDEMPOTENCY_UNAVAILABLE (503, with Retry-After). These come from the shared request wrappers, are outside the webhook error-code set, and are safe to retry.

curl -X POST https://api.platformxe.com/api/v1/webhooks/dispatch \
  -H "Content-Type: application/json" \
  -H "x-api-key: $PLATFORMXE_API_KEY" \
  -H "x-idempotency-key: booking-b_123-created" \
  -d '{
    "recipientRef": "host:1",
    "eventType": "booking.created",
    "eventId": "evt_2026_10_20_0001",
    "data": { "bookingId": "b_123" }
  }'

List deliveries

GET /api/v1/webhooks/:id/deliveries?page=&limit= -- newest first.

{
  "success": true,
  "data": {
    "items": [
      {
        "id": "dlv_9",
        "eventType": "booking.created",
        "eventId": "evt_2026_10_20_0001",
        "status": "FAILED",
        "attemptCount": 5,
        "responseStatus": 500,
        "responseTimeMs": 230,
        "responseSnippet": "Internal Server Error",
        "nextRetryAt": null,
        "deliveredAt": null,
        "createdAt": "2026-10-20T10:00:00.000Z"
      }
    ],
    "total": 1,
    "page": 1,
    "limit": 20
  }
}

status is PENDING, SUCCESS, RETRYING or FAILED. Rows never carry the payload or a secret. For a v2 endpoint responseSnippet is the receiver's response body, redacted and capped at 2 KB; for a v1 endpoint it is always null.

Redeliver

POST /api/v1/webhooks/deliveries/:deliveryId/redeliver -- re-sends one v2 delivery once, with the same delivery id and stored payload.

{ "success": true, "data": { "deliveryId": "dlv_9", "ok": false, "status": null, "responseTimeMs": 4, "reason": "URL_REFUSED" } }

reason is one of URL_REFUSED, TIMEOUT, NETWORK, HTTP, REDIRECT. A delivery of a v1 endpoint is BAD_REQUEST; a delivery that is being processed or is about to be retried (a retry due within about 70 seconds) is DELIVERY_IN_PROGRESS -- try again shortly. A PAUSED endpoint can be redelivered to; its status does not change. A key with an organisation cannot redeliver a delivery of an endpoint with no organisation (NOT_FOUND).

Error responses

CodeStatusDescription
BAD_REQUEST400Invalid JSON, or the request is not allowed (for example redelivering a v1 delivery)
VALIDATION_ERROR400A field failed validation (name, url, events, engineVersion, recipientRef, eventType, eventId)
LIMIT_EXCEEDED400The per-service (untargeted) or per-recipient (v2) endpoint cap, or the 50,000 recipient-endpoint ceiling, is reached
URL_REFUSED400The URL is not HTTPS, carries credentials, is not a public host, or its DNS answer took longer than 3 seconds
UNAUTHORIZED401Missing or invalid API key
FORBIDDEN403The key lacks the required scope, or the webhook belongs to another service or another organisation's endpoint, or a key with an organisation tries to change (update, delete, rotate, test) an endpoint with no organisation
NOT_FOUND404The webhook or delivery does not exist, or the delivery belongs to another service or another organisation's endpoint, or a key with an organisation redelivers a delivery of an endpoint with no organisation
DELIVERY_IN_PROGRESS409The delivery is being processed or is about to be retried; or, on a delete, the endpoint still has platform event deliveries in progress. Try again shortly
INTERNAL_ERROR500Unexpected failure; nothing was changed

This set is closed. The shared request wrappers can also answer RATE_LIMITED (429, any route), and on a dispatch CONFLICT (409) and IDEMPOTENCY_UNAVAILABLE (503); treat them as retryable.