PlatformXeDocs
Get API Key

Custom Events Federation Groups

Create federation groups, invite Enterprise organisations, and manage memberships over HTTP.

Federation shares live custom-event traffic with other organisations. An owner organisation creates a group, invites other PlatformXe organisations (or adds external webhook peers), and declares pushes: each emit of a pushed version is relayed to every accepted member, where it arrives as a federated type named after the owner, fed-<owner>.<namespace>.<name>, never on the member's own types. Concepts, SDK calls and wire shapes: Federation (SDK).

Who may call

  • Scope: events:federate for every POST and DELETE (an events:manage key holds it too); events:read for every GET.
  • Plan: Enterprise on both sides. The routes marked "Enterprise" below answer 402 FEDERATION_NOT_AVAILABLE to any other plan; the exits (archive, leave, remove, pause) are open on every plan. At send time nothing is relayed while the owner or a member is not eligible (effective plan Enterprise, organisation active, subscription not cancelled; a first-party Caldera organisation always is).
  • Relationship: each route checks the caller's role in the group. An organisation that was never a member, or was removed, gets 404 GROUP_NOT_FOUND from every route, so a group id is never confirmed to an outsider. A member calling an owner-only route gets 403 FORBIDDEN.
MethodPathCallerPlan
GET/api/v1/events/custom/federation/groupsAny organisationEnterprise
POST/api/v1/events/custom/federation/groupsBecomes the ownerEnterprise
GET/api/v1/events/custom/federation/groups/{id}Owner or live memberEnterprise
DELETE/api/v1/events/custom/federation/groups/{id}OwnerAny
POST/api/v1/events/custom/federation/groups/{id}/inviteOwnerEnterprise
POST/api/v1/events/custom/federation/groups/{id}/acceptPending inviteeEnterprise
POST/api/v1/events/custom/federation/groups/{id}/leaveMember (pending, accepted or paused)Any
DELETE/api/v1/events/custom/federation/groups/{id}/members/{orgId}OwnerAny
POST/api/v1/events/custom/federation/groups/{id}/members/{orgId}/pauseOwner, or the member itselfAny
POST/api/v1/events/custom/federation/groups/{id}/members/{orgId}/resumeThe side that pausedEnterprise

The POST routes that create something (groups, invite) honour an x-idempotency-key header: a retry with the same key replays the first answer.

Create a group

POST /api/v1/events/custom/federation/groups

FieldTypeRequiredDescription
namestringYes3 to 80 characters, unique among the groups your organisation owns (archived ones included)
descriptionstringNoAt most 2,000 characters
curl -X POST https://api.platformxe.com/api/v1/events/custom/federation/groups \
  -H "Content-Type: application/json" \
  -H "x-api-key: pxk_live_your_api_key_here" \
  -d '{ "name": "Lettings partners", "description": "Booking events for partner agencies" }'

201:

{
  "success": true,
  "data": {
    "id": "k3v9x2m8q1p0w7r4t6y5u3e2",
    "ownerOrganizationId": "org_…",
    "name": "Lettings partners",
    "description": "Booking events for partner agencies",
    "createdBy": "lettings",
    "createdAt": "2026-11-20T09:00:00.000Z",
    "updatedAt": "2026-11-20T09:00:00.000Z",
    "archivedAt": null,
    "callerRole": "owner",
    "memberCount": 0,
    "pushCount": 0
  }
}

Errors: 400 BAD_REQUEST (name or description invalid), 409 DUPLICATE (name taken), 409 LIMIT_REACHED (50 live groups per organisation). Emits CUSTOM_EVENT_FEDERATION_GROUP_CREATED to the owner.

List your groups

GET /api/v1/events/custom/federation/groups

The groups you own and the groups you are a member of, as { "groups": [ … ] } (the summary above, with callerRole set to owner, pending, accepted, paused or removed). Archived groups are left out unless includeArchived=true; groups you left or were removed from are left out unless includeRemoved=true, and then show memberCount and pushCount as 0. createdBy is shown to the owner only (null for members).

Read a group

GET /api/v1/events/custom/federation/groups/{id}

The summary plus members and pushes (active pushes only), shaped by the caller's role:

CallermembersExternal peers
OwnerEvery member, removed ones includedURL, label and header names (never values)
Accepted or paused memberLive members; other members' actor labels (invitedBy, acceptedBy, …) are nullLabel only
Pending invitee[] (no member list before it accepts)—
Anyone else404 GROUP_NOT_FOUND—

A push's pushedBy / unpushedBy are shown to the source organisation only. Wire shapes: Federation: reference.

Archive a group

DELETE /api/v1/events/custom/federation/groups/{id}

Owner only, on any plan. Archives the group and deactivates every push in it in one transaction, so new relays and in-flight relay retries stop. A member's federated copies that no other live membership needs are archived. Answers the group summary with archivedAt set; emits CUSTOM_EVENT_FEDERATION_GROUP_ARCHIVED to the owner and every live member. An archived group cannot be restored.

Errors: 403 FORBIDDEN (a member), 404 GROUP_NOT_FOUND, 409 GROUP_ARCHIVED (already archived).

Invite an organisation

POST /api/v1/events/custom/federation/groups/{id}/invite

{ "memberOrganizationId": "org_partner" }

Owner only. Creates a pending membership (201, the member summary below) and emits CUSTOM_EVENT_FEDERATION_MEMBER_INVITED to the owner and to the invitee's own subscriptions. The invitee's plan is not checked or disclosed here: it is checked when the invitee accepts. A removed member can be invited again.

{
  "success": true,
  "data": {
    "id": "m8q1p0w7r4t6y5u3e2k3v9x2",
    "groupId": "k3v9x2m8q1p0w7r4t6y5u3e2",
    "peerType": "tenant_org",
    "memberOrganizationId": "org_partner",
    "externalWebhookUrl": null,
    "externalWebhookLabel": null,
    "externalWebhookHeaderNames": null,
    "status": "pending",
    "invitedBy": "lettings",
    "invitedAt": "2026-11-20T09:05:00.000Z",
    "acceptedBy": null,
    "acceptedAt": null,
    "pausedBy": null,
    "pausedAt": null,
    "removedBy": null,
    "removedAt": null
  }
}

Errors: 400 BAD_REQUEST (memberOrganizationId missing, or the owner itself), 403 FORBIDDEN (a member), 404 GROUP_NOT_FOUND, 404 ORGANIZATION_NOT_FOUND, 409 GROUP_ARCHIVED, 409 DUPLICATE (already pending, accepted or paused), 409 LIMIT_REACHED (100 member organisations per group).

Accept an invitation

POST /api/v1/events/custom/federation/groups/{id}/accept

Called by the invitee, with no body. In one transaction the membership becomes accepted and every active push of the group is copied into your organisation as a published federated type, so you can subscribe to it at once. Answers your member summary; emits CUSTOM_EVENT_FEDERATION_MEMBER_ACCEPTED to the owner and to you.

If you already hold that federated type with a different schema, or hold 500 federated types, the accept is refused and nothing changes: 409 FEDERATED_TYPE_CONFLICT or 409 LIMIT_REACHED.

Other errors: 400 BAD_REQUEST (the owner has no invitation), 404 GROUP_NOT_FOUND, 409 GROUP_ARCHIVED, 409 INVALID_STATE (not pending).

Leave a group

POST /api/v1/events/custom/federation/groups/{id}/leave

Called by a member, on any plan. A pending invitee leaving declines the invitation. The membership becomes removed, relays to you stop, and your federated copies that no other membership needs are archived. Answers your member summary; emits CUSTOM_EVENT_FEDERATION_MEMBER_REMOVED (reason: "member_left") to the owner and to you.

Errors: 400 BAD_REQUEST (the owner cannot leave; archive the group instead), 404 GROUP_NOT_FOUND.

Remove a member or revoke an invitation

DELETE /api/v1/events/custom/federation/groups/{id}/members/{orgId}

Owner only, on any plan. An accepted or paused member is removed (relays and in-flight retries stop); a pending invitation is revoked. Either way the membership ends removed and can be invited again. Emits CUSTOM_EVENT_FEDERATION_MEMBER_REMOVED (reason: "owner_removed") to the owner and the member.

Errors: 403 FORBIDDEN (a member), 404 GROUP_NOT_FOUND, 404 MEMBER_NOT_FOUND, 409 INVALID_STATE (already removed).

Pause and resume a membership

POST /api/v1/events/custom/federation/groups/{id}/members/{orgId}/pause

POST /api/v1/events/custom/federation/groups/{id}/members/{orgId}/resume

The owner can pause any accepted membership; a member can pause only its own. While paused, nothing is relayed to that member and the federated copies are kept. The side that paused resumes: an owner pause by the owner, a member pause by the member. Pause is open on every plan; resume needs Enterprise. A membership the daily reconcile paused because a side left Enterprise (pausedBy: "system:plan_downgrade") cannot be resumed by hand: it resumes on its own when both sides are eligible again.

Both answer the member summary. No lifecycle event is emitted for a pause or a resume.

Errors: 403 FORBIDDEN (a member acting on another member, or resuming the other side's pause), 404 GROUP_NOT_FOUND, 404 MEMBER_NOT_FOUND, 409 GROUP_ARCHIVED, 409 INVALID_STATE (pause: not accepted; resume: not paused, or a plan pause).

Error codes

Every federation route (groups, external peers, pushes) answers from this set. The POSTs that take an x-idempotency-key (create a group, invite, add an external peer, push) can also answer the two idempotency codes at the end of the table.

CodeStatusCause
BAD_REQUEST400Body not a JSON object, a field missing or out of bounds, or an action that does not apply (the owner accepting or leaving)
UNAUTHORIZED401Missing or invalid API key
FEDERATION_NOT_AVAILABLE402The caller is not on Enterprise
FORBIDDEN403Scope missing, key without an organisation, or a member calling an owner-only action
GROUP_NOT_FOUND404No such group, or the caller has no live relationship with it
MEMBER_NOT_FOUND404That organisation is not a member of the group
PEER_NOT_FOUND404No such external peer in a group the caller belongs to
PUSH_NOT_FOUND404No such push in a group the caller belongs to
ORGANIZATION_NOT_FOUND404The invited organisation does not exist
REGISTRATION_NOT_FOUND404The registration to push is not one of the owner's
NOT_FOUND404The caller's organisation was not found
GROUP_ARCHIVED409The group is archived
DUPLICATE409Already a member, peer or push, or a group name taken
EVENT_NOT_PUSHABLE400The generic event or a federated type cannot be pushed
INVALID_STATE409The membership, peer or push is not in a state the action applies to
LIMIT_REACHED409A cap (see Federation: limits)
FEDERATED_TYPE_CONFLICT409A member already holds that federated type with another schema
RATE_LIMITED429The key's request budget
INTERNAL_ERROR500Try again later
KMS_UNAVAILABLE503An external peer's secret could not be sealed
CONFLICT409Keyed POSTs: a request with the same x-idempotency-key is still being processed
IDEMPOTENCY_UNAVAILABLE503Keyed POSTs: the request could not be checked for a repeat; nothing was processed. Retry after Retry-After