Define a Platform Event object in Setup (MyEvent__e) with the required fields; note the full API name including the __e suffix.
From an external system, POST to /services/data/vXX.0/sobjects/MyEvent__e/ with a JSON body containing the event's field values — treat it like a regular sObject insert.
Confirm the response contains 'success': true and a generated ID; Platform Events do not truly persist as records, so the ID is ephemeral.
Subscribers (Flows, Apex triggers on Platform Events, or external CometD clients) receive the event asynchronously; design for eventual delivery, not synchronous confirmation.
For external subscribers, connect to /cometd/vXX.0/ using a CometD client, subscribe to /event/MyEvent__e, and supply the replayId -1 to receive new events or a stored replayId to replay from a checkpoint.
Implement replayId persistence in the subscriber so that a restart replays any events missed during downtime, up to the 72-hour retention window.
Known gotchas
Platform Events published via the REST API are subject to the org's Platform Event publishing allocation — high-volume publishers should monitor the org limit via the Limits API.
Subscribers connected via CometD must re-handshake within the session timeout (default 40 seconds) or they will be disconnected and miss events without a stored replayId to recover.
High-volume Platform Events (>100k/day) should use the Pub/Sub API gRPC interface instead of CometD for reliable, back-pressure-aware consumption.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp