Connect to an event stream

GET/event-streams/{event_stream_id}/events

Opens the Server-Sent Events connection for an event stream. Send Accept: text/event-stream and authenticate with the Authorization header; credentials in the query string are not accepted.

Each message carries the event's public ID in id, its type in event, and in data the same JSON returned when retrieving the event. Without a Last-Event-ID header, delivery resumes from the stream's stored cursor; with it, delivery resumes after that event. Keep-alive comments are sent periodically.

Only one connection per stream is allowed at a time. The server closes the connection after a maximum duration, or when the stream expires, is revoked, or the credential is revoked; reconnect with Last-Event-ID to continue. Each connection extends the stream's expiration.

Delivery has a latency of a few seconds and is not real-time.

AuthorizationBearer <token>

Autonomous mode: the API credential secret, sent as a bearer token. Credential secrets are identified by a fixed prefix.

In: header

Path Parameters

event_stream_id*string

Public ID of the event stream, prefixed with str_.

Header Parameters

Last-Event-ID?string

Public ID of the last event received. Delivery resumes after this event instead of from the stream's stored cursor.

X-Client-Request-Id?string

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.

Lengthlength <= 64

Response Body

text/event-stream

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/event-streams/string/events"
"string"