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
| Field | Type | Description |
|---|---|---|
id | string | The subscription's id |
organizationId | string | Your organisation |
name | string | Your label for it (3 characters or more) |
eventTypes | string[] | The event names and patterns it receives (see Wildcard patterns) |
webhookUrl | string | The HTTPS URL events are delivered to |
status | string | ACTIVE, PAUSED or FAILING (see Webhook Delivery) |
consecutiveFailures | number | Failed deliveries in a row |
lastTriggeredAt | string | null | When it was last sent an event |
createdAt | string | When it was created |
restrictedEventTypes | string[] | 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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | A label, 3 characters or more (trimmed) |
eventTypes | string[] | Yes | A non-empty list of non-blank event names or patterns. A TENANT_CUSTOM: pattern must name your own organisation |
webhookUrl | string | Yes | A 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.
| Field | Type | Description |
|---|---|---|
name | string | 3 characters or more (trimmed) |
eventTypes | string[] | A non-empty list of non-blank strings; replaces the stored list |
webhookUrl | string | A public HTTPS URL (trimmed; must not be blank) |
status | string | ACTIVE, 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
| Code | Status | Description |
|---|---|---|
BAD_REQUEST | 400 | Invalid JSON body (create and update) |
VALIDATION_ERROR | 400 | name 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_TYPE | 400 | eventTypes names a fraud or compliance event that is never delivered (the message lists the entries to remove). See Fraud and compliance events |
FORBIDDEN | 403 | API 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_FOUND | 404 | No subscription has that id |