Custom Events Overview
Register your own typed events, emit them, share their schemas through the marketplace and push live traffic to partner organisations.
Custom events are event types your organisation defines. You register a shape (a JSON Schema), emit payloads against it, and PlatformXe validates each payload, stores it and delivers it to your event subscriptions (webhooks) and to any federation peers. Every organisation also has the platform-provided platformxe.generic catch-all event, so a Free organisation can emit without registering anything.
This section documents the HTTP routes. The SDK pages carry the client calls, the full schema rules and the wire shapes: Custom Events, Marketplace, Federation. The tenant portal has the same features under Custom events (types, tester, marketplace, federation).
How it fits with platform events
| Platform events | Custom events | |
|---|---|---|
| Who defines the type | PlatformXe (INVOICE_PAID, FILE_UPLOADED, …) | Your organisation (<namespace>.<name>@<version>) |
| Who emits | PlatformXe services | Your app, through POST /api/v1/events/custom/emit |
| Bus name | The event type | TENANT_CUSTOM:<organizationId>:<namespace>.<name>@<version> |
| How you receive it | Event subscriptions | The same subscriptions (or POST /api/v1/events/custom/subscribe), and federation peers |
The organisation id in the bus name keeps every tenant's types apart: two organisations can both register orders.created without meeting.
Schemas
- JSON Schema 2020-12. OpenAPI 3.1 component schemas are accepted as a strict superset. Every schema and payload is checked by one validator configuration.
- Immutable per version. A
(namespace, name, version)never changes its schema. Evolve a shape by registering the next version: a patch may change only thedescription, a minor must be backwards-compatible, a major is free. - Bounded. Depth at most 5, at most 50 declared properties, at most 64 KiB, enums at most 500 values, patterns RE2-safe, and an evaluation-cost budget. Payloads are at most 64 KiB and are validated with a 250 ms budget. The full list, with each error code, is on Custom Events: limits and schema rules.
- Naming. Namespace
^[a-z][a-z0-9_-]{1,30}$, from your organisation's allow-list (seeded with your organisation's slug); name^[a-z][a-z0-9_.-]{1,60}$; version strictMAJOR.MINOR.PATCH. Platform namespaces (identity,fraud,messaging,webhooks,platformxe,events, …) are reserved for every tenant.
Scopes
| Scope | Gives |
|---|---|
events:read | Every GET under /api/v1/events/custom (registrations, health, marketplace, federation reads) |
events:manage | Every other method under /api/v1/events/custom outside /federation: register, publish, archive, dry run, emit, subscribe, marketplace publish / unpublish / republish / fork |
events:federate | Every non-GET under /api/v1/events/custom/federation |
An events:manage key also holds events:federate (an alias, kept until a narrower emit-only scope exists), so every key that can emit can also change federation. Keep events:manage keys to the services you trust with federation.
Every route also needs a key bound to an organisation: a platform key with no organisation is refused 403 FORBIDDEN ("API key is not bound to an organization").
Plans
Plan gates read your effective plan: a first-party Caldera organisation is graded Enterprise; any other organisation is graded by its own plan.
| Free | Basic | Pro | Enterprise | |
|---|---|---|---|---|
Emit platformxe.generic | yes | yes | yes | yes |
| Register, publish, archive, emit your own types | — | yes | yes | yes |
| Active registrations (not counting the generic event or federated copies) | 0 | 5 | 25 | unlimited |
| Registrations per UTC day | 0 | 5 | 20 | 100 |
| Emits per month (generic and registered together) | 1,000 | 10,000 | 100,000 | unlimited |
| Every version kept live | — | latest only | yes | yes |
| Browse the marketplace, unpublish your own listings | yes | yes | yes | yes |
| Publish, republish, fork listings | — | — | yes | yes |
| Federation (groups, pushes, external peers) | — | — | — | yes |
A route your plan does not cover answers 402 with its own code: CUSTOM_EVENTS_REGISTRATION_NOT_AVAILABLE, CUSTOM_EVENTS_EMIT_RESTRICTED, MARKETPLACE_PUBLISH_NOT_AVAILABLE, MARKETPLACE_FORK_NOT_AVAILABLE or FEDERATION_NOT_AVAILABLE. Actions that end or withdraw something (unpublish a listing, archive a group, leave, remove a member or peer, pause) are not plan-gated, so an organisation that moves down a plan can still clean up.
Emit audit rows are kept 90 days, and 7 years on Enterprise.
Rate limits
| Route | Limit |
|---|---|
POST /api/v1/events/custom (register) | 60 per hour per API key |
POST /api/v1/events/custom/dry-run | 200 per hour per API key |
POST /api/v1/events/custom/emit (and an emit-mode dry run) | 1,000 per second per event name |
| Every other route | The API key's own request budget |
A limited request answers 429 RATE_LIMITED.
Routes
| Method | Path | Page |
|---|---|---|
| GET | /api/v1/events/custom | Event types |
| POST | /api/v1/events/custom | Event types |
| GET | /api/v1/events/custom/{id} | Event types |
| PATCH | /api/v1/events/custom/{id} | Event types |
| DELETE | /api/v1/events/custom/{id} | Event types |
| POST | /api/v1/events/custom/dry-run | Event types |
| POST | /api/v1/events/custom/emit | Event types |
| POST | /api/v1/events/custom/subscribe | Event types |
| GET | /api/v1/events/custom/health | Health (below) |
| Six routes | Under /events/custom/marketplace: browse, read, publish, unpublish, republish, fork | Marketplace |
| Ten routes | Under /events/custom/federation/groups: groups, invitations, members | Federation groups |
| Four routes | Adding, removing, pausing and resuming external webhook peers | External peers |
| Four routes | Declaring, listing and undeclaring pushes, and the relay log | Pushes |
Health
GET /api/v1/events/custom/health
Your plan, how much of it you have used, and what needs attention. Scope events:read; every plan.
curl https://api.platformxe.com/api/v1/events/custom/health \
-H "x-api-key: pxk_live_your_api_key_here"
{
"success": true,
"data": {
"plan": "BASIC",
"registrations": { "used": 4, "limit": 5, "createdToday": 1, "dailyLimit": 5 },
"emits": { "thisMonth": 9812, "monthlyLimit": 10000 },
"capabilities": {
"canRegister": true,
"schemaVersioning": false,
"marketplacePublish": false,
"marketplaceFork": false,
"federationPush": false
},
"recentFailures": [
{ "id": "cee_e7r2t9y4u1i6o3p8a5s0d2fg", "canonicalName": "TENANT_CUSTOM:org_…:lettings.property.favorited@1.0.0", "errorMessage": "…", "createdAt": "2026-11-20T09:12:00.000Z" }
],
"patternEngine": "re2",
"needsReview": [],
"subscriptions": {
"byStatus": { "ACTIVE": 3, "FAILING": 1 },
"isolated": 1,
"recentDeliveryFailures": [
{ "subscriptionId": "…", "eventType": "TENANT_CUSTOM:org_…:lettings.property.favorited@1.0.0", "lastResponseStatus": 500, "attempts": 6, "createdAt": "2026-11-20T09:12:00.000Z" }
]
}
}
}
| Field | Meaning |
|---|---|
plan | Your effective plan |
registrations.limit, emits.monthlyLimit | null when the plan is unlimited |
capabilities | What the plan allows (the table above) |
recentFailures | The last 10 emits that could not be delivered |
patternEngine | re2, or native-guarded while the RE2 engine is unavailable (every schema pattern is then refused) |
needsReview | Live registrations made before the current schema rules that those rules would now refuse (id, canonicalName, reason); register a new version that passes |
subscriptions | Your subscriptions that listen to custom events, by status; isolated counts the FAILING ones; the last 10 deliveries that ran out of retries |
Errors: 401 UNAUTHORIZED, 403 FORBIDDEN (scope missing, key without an organisation, organisation inactive), 404 NOT_FOUND (organisation not found).
Errors
Every route answers the platform envelope:
{ "success": false, "error": { "code": "FEDERATION_NOT_AVAILABLE", "message": "Federation push is available on the Enterprise plan only. Your current plan is PRO." } }
Registration and emit codes from the service are lower snake case (version_already_exists, payload_invalid); the routes' own body checks answer BAD_REQUEST / VALIDATION_ERROR and listed on Custom Events: error codes; marketplace and federation codes are upper snake case and listed on each page here. A route that fails unexpectedly answers 500 INTERNAL_ERROR with no detail.