Create an event stream
/event-streamsCreates an event stream that delivers the account's public events over Server-Sent Events (SSE), with the same payloads and ordering as the events collection. Optional filters restrict the stream to specific event types and resource types. Use start to choose whether the stream also delivers retained events published before it was created (earliest, the default) or only events published afterwards (now).
Requires an Idempotency-Key header. The credential must also have the events.read permission; otherwise the request fails with permission_denied.
The number of active event streams is limited per credential and per account. Creating a stream beyond these limits returns 429 with the too_many_streams error code in the standard error envelope, without the rate-limit fields.
Autonomous mode: the API credential secret, sent as a bearer token. Credential secrets are identified by a fixed prefix.
In: header
Header Parameters
Client-generated key that makes the request safe to retry. Must be 1 to 128 characters from [A-Za-z0-9._:-]. Required by this operation: a missing key returns idempotency_key_required, and a malformed key returns idempotency_key_invalid. Repeating the request with the same key and the same body returns the stored result with Idempotent-Replayed: true.
Optional client-generated identifier of the request, up to 64 characters from [A-Za-z0-9._-]. Echoed back in the response and recorded in the request log; it never replaces the server-generated X-Request-Id.
length <= 64Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/event-streams" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{}'{ "data": { "connection": { "connected": true, "since": "2019-08-24T14:15:22Z" }, "created_at": "2019-08-24T14:15:22Z", "cursor": { "advanced_at": "2019-08-24T14:15:22Z", "last_event_id": "string" }, "expires_at": "2019-08-24T14:15:22Z", "filters": { "event_types": [ "string" ], "resource_types": [ "string" ] }, "id": "string", "last_seen_at": "2019-08-24T14:15:22Z", "object": "event_stream", "status": "active" }}List event streams GET
Lists the event streams created by the current credential, using cursor-based pagination. Event streams created by other credentials are never included, even within the same account.
Retrieve an event stream GET
Returns the event stream's status, filters, delivery cursor, and connection state. Revoked and expired event streams remain retrievable.