Custom Events Marketplace
Publish your registered events to a shared marketplace so other tenants can fork the schema into their own org. Pro+.
The client.events.custom.marketplace namespace lets PRO+ tenants share event schemas across organisations. A publisher exposes a registered event as a listing; another PRO+ tenant forks the listing — the platform copies the schema into the fork's org as a fresh registration the fork tenant fully owns. Forks are independent thereafter (no upstream propagation). Available in TypeScript, Python, Go, and Terraform.
| SDK | Install | Namespace |
|---|---|---|
| TypeScript | npm install @caldera/platformxe-sdk@^1.3.0 | client.events.custom.marketplace |
| Python | pip install "platformxe @ git+https://github.com/calderaxe/platformxe-python@v1.7.0" (not on PyPI yet) | client.events.custom.marketplace (sync client; the async client has no custom-events surface) |
| Go | go get github.com/calderaxe/platformxe-go@v1.7.0 | client.Events.Custom.Marketplace |
| Terraform | source = "calderaxe/platformxe" ≥ 1.2.0 | platformxe_marketplace_listing |
mine, the opt-in payloadExample and publisherName (2026-11-17) are in the Python and Go SDKs on this repository's master; the TypeScript SDK follows in its own release.
Plan tiers
| Capability | Free | Basic | Pro | Enterprise |
|---|---|---|---|---|
| Browse listings | ✅ | ✅ | ✅ | ✅ |
| Publish your own | — | — | ✅ | ✅ |
| Republish your own | — | — | ✅ | ✅ |
| Fork a listing | — | — | ✅ | ✅ |
| Unpublish your own | ✅ | ✅ | ✅ | ✅ |
Changes need the events:manage scope; reads need events:read.
What forking does
When you fork a listing:
- The platform creates a new registration in your org with the listing's schema copied verbatim. A fork is a registration: every register control applies — naming, your namespace allowlist, the schema rules and cost limits, semver and backward compatibility against your own earlier versions of the same name, your plan's active-registration cap and its daily registration cap (a fork counts toward both), and on Basic the latest-version-only rule (
400 VALIDATION_FAILED,402 REGISTRATION_QUOTA_EXCEEDED,429 DAILY_REGISTRATION_CAP_EXCEEDED). - The fork shows up as a normal registered event — you can emit against it, archive it, bump versions, all independently.
- A
marketplace_forksrow records source attribution so audit logs preserve provenance. - The publisher's
forkCountincrements, and the publisher receivesMARKETPLACE_LISTING_FORKED— with the forking organisation, registration and actor shown asredacted(only the forker's own copy names them).
Forks do NOT auto-update. When a publisher pushes a new version of an event they previously listed, your fork is unaffected. To pick up the new shape, fork the new listing.
Quick start — browse + fork
// Browse
const { listings } = await client.events.custom.marketplace.list({
search: 'property',
limit: 10,
});
console.log(listings[0].publisherName); // the publisher's name (never its organisation id)
// Look at one
const detail = await client.events.custom.marketplace.get(listings[0].id);
console.log(detail.payloadSchema);
// Fork it into your org under your own naming
const fork = await client.events.custom.marketplace.fork(listings[0].id, {
namespace: 'lettings', // must be on your org's allowlist
name: 'property.favorited', // your local name
// version defaults to '1.0.0' (MAJOR.MINOR.PATCH)
// status 'draft' (default) or 'published'
});
console.log(fork.forkCanonicalName); // 'TENANT_CUSTOM:org_yours:lettings.property.favorited@1.0.0'
console.log(fork.sourceCanonicalName); // 'lettings.property.favorited@1.0.0' (the listing)
listings = client.events.custom.marketplace.list(search="property", limit=10)
detail = client.events.custom.marketplace.get(listings["data"]["listings"][0]["id"])
fork = client.events.custom.marketplace.fork(
listings["data"]["listings"][0]["id"],
namespace="lettings",
name="property.favorited",
)
out, _ := client.Events.Custom.Marketplace.List(platformxe.ListMarketplaceParams{
Search: ptr("property"),
Limit: ptr(10),
})
detail, _ := client.Events.Custom.Marketplace.Get(out.Listings[0].ID)
fork, _ := client.Events.Custom.Marketplace.Fork(out.Listings[0].ID, platformxe.ForkMarketplaceInput{
Namespace: "lettings",
Name: "property.favorited",
})
Publish
// You've already registered this event and published it (status='published').
const listing = await client.events.custom.marketplace.publish({
registrationId: 'cer_…',
title: 'Property favorited',
description: 'Fired when a customer favorites a property in a lettings agent UI.',
tags: ['lettings', 'crm', 'favorites'],
payloadExample: { propertyId: 'p_example', userId: 'u_example' }, // optional, opt-in
});
listing.id; // 'mkl_…'
listing.sourceCanonicalName; // 'TENANT_CUSTOM:your-org:lettings.property.favorited@1.0.0' (your own listing)
listing.status; // 'published'
resource "platformxe_marketplace_listing" "property_favorited" {
registration_id = platformxe_custom_event.property_favorited.id
title = "Property favorited"
description = "Fired when a customer favorites a property in a lettings agent UI."
tags = ["lettings", "crm", "favorites"]
}
Validation:
- Source registration must be owned by the publishing org and
status = 'published'. - The platform-seeded generic event (
platformxe.generic) and federated types (fed-*, received through federation) cannot be listed (400 EVENT_NOT_PUBLISHABLE). - Title 3–120 characters, description at most 2,000, at most 10 tags of at most 32 characters.
- The registration's own example is never copied (it is often a captured real payload). Pass
payloadExampleto show one: it must match the schema and be at most 16 KB. Every tenant can read it. - Listings are pinned per
(orgId, namespace, name, version). Re-publishing the same triple returns409 LISTING_ALREADY_EXISTS— bump the source event's version to publish a new shape.
Unpublish + republish
// Hide the listing from every other tenant — existing forks are unaffected.
await client.events.custom.marketplace.unpublish('mkl_…');
// Re-activate later (Pro+: republishing is publishing).
await client.events.custom.marketplace.republish('mkl_…');
An unpublished listing is invisible to every other tenant — not in browse, 404 on get and fork — and kept, with its schema, for forensics. Only you see it (list({ mine: true })). A listing whose source registration is archived is hidden the same way and cannot be forked or republished.
An archived listing was taken down by a PlatformXe administrator (for example abusive text, or an example holding personal data); it cannot be republished. Publish a new version instead.
Browse
const result = await client.events.custom.marketplace.list({
namespace: 'lettings', // optional namespace filter
search: 'property', // free-text on title + description (% and _ are literal)
limit: 25, // [1..100]
offset: 0,
});
result.listings; // MarketplaceListingSummary[]
result.total; // total count (un-paginated)
// Your own listings, any status:
const mine = await client.events.custom.marketplace.list({ mine: true, status: 'unpublished' });
Without mine, only published listings are listed; status: 'unpublished' | 'archived' without mine: true is 400 BAD_REQUEST. Sort order is published_at DESC, id ASC.
Reference — wire shapes
PublishMarketplaceRequest:
{
registrationId: string; // source registration to publish
title: string; // 3–120 chars
description?: string; // at most 2,000 chars
tags?: string[]; // at most 10, each at most 32 chars
payloadExample?: object; // opt-in, must match the schema, at most 16 KB
}
MarketplaceListingSummary (returned from list/publish/republish):
{
id: string; // 'mkl_…'
publisherName: string; // the publisher's organisation name
publisherOrganizationId: string | null; // your own listings only
namespace: string;
name: string;
version: string;
sourceCanonicalName: string; // your own: TENANT_CUSTOM:your-org:ns.name@v; others: ns.name@v
title: string;
description: string | null;
tags: string[];
status: 'published' | 'unpublished' | 'archived';
forkCount: number;
publishedBy: string | null; // your own listings only
publishedAt: string;
unpublishedAt: string | null;
createdAt: string;
updatedAt: string;
}
MarketplaceListingDetail extends summary with payloadSchema: object and payloadExample: object | null.
ForkMarketplaceRequest:
{
namespace: string; // must be on fork org's allowlist + match /^[a-z][a-z0-9_-]{1,30}$/
name: string; // matches /^[a-z][a-z0-9_.-]{1,60}$/
version?: string; // MAJOR.MINOR.PATCH, default "1.0.0"
description?: string; // optional override
status?: 'draft' | 'published'; // default 'draft'
}
ForkMarketplaceResponse:
{
forkId: string; // 'mkf_…' (the marketplace_forks row)
forkRegistrationId: string; // 'cer_…' (the registration in your org)
forkCanonicalName: string; // TENANT_CUSTOM:your-org:ns.name@v
sourceCanonicalName: string; // the listing's ns.name@v
}
Reference — error codes
Since 2026-11-17 every code is SCREAMING_SNAKE (before, the service codes were lowercase: listing_not_found, invalid_title, …; match the new names).
| Code | Status | Cause |
|---|---|---|
BAD_REQUEST | 400 | Body not JSON or a field invalid (title, description, tags, example, fork status / version types); an invalid query (unknown status, a withdrawn status without mine, limit / offset) |
UNAUTHORIZED | 401 | API key missing, invalid or inactive |
MARKETPLACE_PUBLISH_NOT_AVAILABLE | 402 | Publish or republish on Free / Basic |
MARKETPLACE_FORK_NOT_AVAILABLE | 402 | Fork on Free / Basic |
REGISTRATION_QUOTA_EXCEEDED | 402 | The fork would exceed your plan's active-registration cap |
DAILY_REGISTRATION_CAP_EXCEEDED | 429 | The fork would exceed your plan's daily registration cap (UTC day) |
FORBIDDEN | 403 | Scope missing or no organisation on the key |
NOT_FOUND | 404 | The calling organisation does not exist |
REGISTRATION_NOT_FOUND | 404 | Source registration not owned by the publisher |
LISTING_NOT_FOUND | 404 | Unknown listing, another publisher's withdrawn listing, or not yours (unpublish / republish) |
EVENT_NOT_PUBLISHABLE | 400 | The generic event or a federated (fed-*) type |
EVENT_NOT_PUBLISHABLE | 409 | Publishing with an example: the source event no longer passes the current schema rules (register a new version first) |
VALIDATION_FAILED | 400 | The fork failed the registration checks (naming, allowlist, schema rules, semver, compatibility) |
REGISTRATION_NOT_PUBLISHED | 409 | Source must be status='published' |
LISTING_ALREADY_EXISTS | 409 | Same (orgId, namespace, name, version) already listed |
ALREADY_UNPUBLISHED | 409 | Unpublishing a listing that is not published |
ALREADY_PUBLISHED | 409 | Republishing a published listing |
ARCHIVED_LISTING | 409 | Taken down, or its source registration is archived — cannot be republished |
LISTING_NOT_PUBLISHED | 409 | Cannot fork a listing that is not published |
FORK_ALREADY_EXISTS | 409 | A registration already exists at the fork's (namespace, name, version) |
PAYLOAD_TOO_LARGE | 413 | The fork request body is over 16 KiB (16,384 bytes) |
RATE_LIMITED | 429 | Per-key rate limit |
INTERNAL_ERROR | 500 | Retry later |
Lifecycle — what fires when
Every state transition emits a typed event on the bus, delivered to the organisations it concerns (organizationId on each copy), so you can subscribe to it on your own key:
MARKETPLACE_LISTING_PUBLISHED— listing row created (publisher)MARKETPLACE_LISTING_UNPUBLISHED— the publisher hid the listing, or PlatformXe took it down (publisher; a takedown'sunpublishedByisplatform-admin)MARKETPLACE_LISTING_REPUBLISHED— re-activated (publisher)MARKETPLACE_LISTING_FORKED— a fork row inserted + fork registration created (forker; the publisher's copy has the forker redacted)MARKETPLACE_LISTING_FORK_FAILED— fork attempted but refused (forker)