PlatformXeDocs
Get API Key

Manage Subscriptions

Create, list, get, update, and delete event subscriptions.

Event subscriptions connect platform events to your webhook endpoints.

Scope: events:manage (every route on this page)

Rate limit: 1,000/hr

Every route needs a key of your organisation: a platform key with no organisation is refused with 403 FORBIDDEN ("Organization context required"). A subscription is your organisation's; the list returns only yours.

The subscription object

FieldTypeDescription
idstringThe subscription's id
organizationIdstringYour organisation
namestringYour label for it (3 characters or more)
eventTypesstring[]The event names and patterns it receives (see Wildcard patterns)
webhookUrlstringThe HTTPS URL events are delivered to
statusstringACTIVE, PAUSED or FAILING (see Webhook Delivery)
consecutiveFailuresnumberFailed deliveries in a row
lastTriggeredAtstring | nullWhen it was last sent an event
createdAtstringWhen it was created
restrictedEventTypesstring[]On get, list and update: the stored eventTypes entries that name a fraud or compliance event that is never delivered (empty when none). See Fraud and compliance events

The signing secret is never part of the object: it is returned once, when the subscription is created.

Create a subscription

POST /api/v1/event-subscriptions

FieldTypeRequiredDescription
namestringYesA label, 3 characters or more (trimmed)
eventTypesstring[]YesA non-empty list of non-blank event names or patterns. A TENANT_CUSTOM: pattern must name your own organisation
webhookUrlstringYesA public HTTPS URL (checked against the webhook URL policy: no private or internal addresses)

PlatformXe generates the signing secret (32 random bytes, base64url); you do not send one. A new subscription is ACTIVE.

curl -X POST https://api.platformxe.com/api/v1/event-subscriptions \
  -H "Content-Type: application/json" \
  -H "x-api-key: pxk_live_your_api_key_here" \
  -d '{
    "name": "Permission changes",
    "eventTypes": ["ROLE_CREATED", "ROLE_UPDATED", "ROLE_DELETED"],
    "webhookUrl": "https://your-app.com/webhooks/platformxe"
  }'
const { subscription, secret } = await client.events.createSubscription({
  name: 'Permission changes',
  eventTypes: ['ROLE_CREATED', 'ROLE_UPDATED', 'ROLE_DELETED'],
  webhookUrl: 'https://your-app.com/webhooks/platformxe',
});

Response (201)

{
  "success": true,
  "data": {
    "subscription": {
      "id": "k2v8q4n1x7m3p9r5t0w6y2zb",
      "organizationId": "org_123",
      "name": "Permission changes",
      "eventTypes": ["ROLE_CREATED", "ROLE_UPDATED", "ROLE_DELETED"],
      "webhookUrl": "https://your-app.com/webhooks/platformxe",
      "status": "ACTIVE",
      "consecutiveFailures": 0,
      "lastTriggeredAt": null,
      "createdAt": "2026-11-20T10:00:00.000Z"
    },
    "secret": "q3Zr…(43 base64url characters)"
  }
}

Store secret now: it is shown only in this response, and it is the key you verify every delivery's X-Caldera-Signature with (see Verifying signatures).

List subscriptions

GET /api/v1/event-subscriptions

Returns every subscription of your organisation (no paging).

curl https://api.platformxe.com/api/v1/event-subscriptions \
  -H "x-api-key: pxk_live_your_api_key_here"
{
  "success": true,
  "data": {
    "items": [
      {
        "id": "k2v8q4n1x7m3p9r5t0w6y2zb",
        "organizationId": "org_123",
        "name": "Permission changes",
        "eventTypes": ["ROLE_CREATED", "ROLE_UPDATED", "ROLE_DELETED"],
        "webhookUrl": "https://your-app.com/webhooks/platformxe",
        "status": "ACTIVE",
        "consecutiveFailures": 0,
        "lastTriggeredAt": "2026-11-20T10:05:00.000Z",
        "createdAt": "2026-11-20T10:00:00.000Z",
        "restrictedEventTypes": []
      }
    ],
    "total": 1
  }
}

Get a subscription

GET /api/v1/event-subscriptions/{id}

Returns one subscription (the object above, with restrictedEventTypes). An unknown id is 404 NOT_FOUND; another organisation's subscription is 403 FORBIDDEN.

curl https://api.platformxe.com/api/v1/event-subscriptions/k2v8q4n1x7m3p9r5t0w6y2zb \
  -H "x-api-key: pxk_live_your_api_key_here"

Update a subscription

PATCH /api/v1/event-subscriptions/{id}

Send only the fields to change. Each is checked as create checks it.

FieldTypeDescription
namestring3 characters or more (trimmed)
eventTypesstring[]A non-empty list of non-blank strings; replaces the stored list
webhookUrlstringA public HTTPS URL (trimmed; must not be blank)
statusstringACTIVE, PAUSED or FAILING. PAUSED stops deliveries; ACTIVE resumes them and starts the failure count again
curl -X PATCH https://api.platformxe.com/api/v1/event-subscriptions/k2v8q4n1x7m3p9r5t0w6y2zb \
  -H "Content-Type: application/json" \
  -H "x-api-key: pxk_live_your_api_key_here" \
  -d '{
    "webhookUrl": "https://your-app.com/webhooks/platformxe-v2",
    "status": "ACTIVE"
  }'

The response is the updated subscription, with restrictedEventTypes.

Delete a subscription

DELETE /api/v1/event-subscriptions/{id}

curl -X DELETE https://api.platformxe.com/api/v1/event-subscriptions/k2v8q4n1x7m3p9r5t0w6y2zb \
  -H "x-api-key: pxk_live_your_api_key_here"
{ "success": true, "data": { "deleted": true } }

To stop deliveries for a while without deleting, set "status": "PAUSED" and later "ACTIVE". A paused subscription's queued retries wait, and are sent if it is reactivated within 24 hours of the event; a retry queued for longer than 24 hours is dropped as failed.

To recover events a subscription missed, see replay (POST /api/v1/event-subscriptions/{id}/replay).

Error responses

CodeStatusDescription
BAD_REQUEST400Invalid JSON body (create and update)
VALIDATION_ERROR400name missing, not a string or under 3 characters; webhookUrl missing, not a string or refused by the URL policy; eventTypes missing, not an array, empty or holding a blank or non-string entry; status not one of ACTIVE, PAUSED, FAILING
RESTRICTED_EVENT_TYPE400eventTypes names a fraud or compliance event that is never delivered (the message lists the entries to remove). See Fraud and compliance events
FORBIDDEN403API key missing events:manage; a key with no organisation; a TENANT_CUSTOM pattern naming another organisation; or (get, update, delete) the subscription is another organisation's
NOT_FOUND404No subscription has that id