PlatformXeDocs
Get API Key

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 eventsCustom events
Who defines the typePlatformXe (INVOICE_PAID, FILE_UPLOADED, …)Your organisation (<namespace>.<name>@<version>)
Who emitsPlatformXe servicesYour app, through POST /api/v1/events/custom/emit
Bus nameThe event typeTENANT_CUSTOM:<organizationId>:<namespace>.<name>@<version>
How you receive itEvent subscriptionsThe 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 the description, 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 strict MAJOR.MINOR.PATCH. Platform namespaces (identity, fraud, messaging, webhooks, platformxe, events, …) are reserved for every tenant.

Scopes

ScopeGives
events:readEvery GET under /api/v1/events/custom (registrations, health, marketplace, federation reads)
events:manageEvery other method under /api/v1/events/custom outside /federation: register, publish, archive, dry run, emit, subscribe, marketplace publish / unpublish / republish / fork
events:federateEvery 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.

FreeBasicProEnterprise
Emit platformxe.genericyesyesyesyes
Register, publish, archive, emit your own types—yesyesyes
Active registrations (not counting the generic event or federated copies)0525unlimited
Registrations per UTC day0520100
Emits per month (generic and registered together)1,00010,000100,000unlimited
Every version kept live—latest onlyyesyes
Browse the marketplace, unpublish your own listingsyesyesyesyes
Publish, republish, fork listings——yesyes
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

RouteLimit
POST /api/v1/events/custom (register)60 per hour per API key
POST /api/v1/events/custom/dry-run200 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 routeThe API key's own request budget

A limited request answers 429 RATE_LIMITED.

Routes

MethodPathPage
GET/api/v1/events/customEvent types
POST/api/v1/events/customEvent 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-runEvent types
POST/api/v1/events/custom/emitEvent types
POST/api/v1/events/custom/subscribeEvent types
GET/api/v1/events/custom/healthHealth (below)
Six routesUnder /events/custom/marketplace: browse, read, publish, unpublish, republish, forkMarketplace
Ten routesUnder /events/custom/federation/groups: groups, invitations, membersFederation groups
Four routesAdding, removing, pausing and resuming external webhook peersExternal peers
Four routesDeclaring, listing and undeclaring pushes, and the relay logPushes

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" }
      ]
    }
  }
}
FieldMeaning
planYour effective plan
registrations.limit, emits.monthlyLimitnull when the plan is unlimited
capabilitiesWhat the plan allows (the table above)
recentFailuresThe last 10 emits that could not be delivered
patternEnginere2, or native-guarded while the RE2 engine is unavailable (every schema pattern is then refused)
needsReviewLive registrations made before the current schema rules that those rules would now refuse (id, canonicalName, reason); register a new version that passes
subscriptionsYour 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.