Skip to main content
POST
Mint a stream token

Authorizations

Authorization
string
header
required

The org's platform API key.

Headers

Nexio-Act-As
string

The member the read is made for (a WorkOS user id). Unset keeps the org-wide posture the key alone grants.

Nexio-Act-As-Email
string

The acting member's verified email, lowercased. Ignored without Nexio-Act-As.

Nexio-Consumer
string

The calling application (workbench).

Nexio-Consumer-Build
string

The calling application's build.

Nexio-Consumer-Vocabulary
string

The access vocabulary hash the calling build was generated against.

Nexio-Request-Id
string

A caller-chosen request id, echoed in the Nexio-Request-Id response header.

Nexio-Timeout
string

The caller's remaining budget for this request, in whole milliseconds (1 to 10 digits, greater than zero), relative to receipt. The engine stops work at the shorter of this and the route's own budget, and answers 504 request_timeout when it expires. A value above the route budget is capped to it; a malformed value is ignored.

Body

application/json
topics
string[] | null
required

["org"] for the org feed, or one to 20 topics, each run:<run id> or record:<family>:<id>.

Required array length: 1 - 20 elements
session
string

The app's own id for the browser session the token is for. Open streams are capped per principal and session, so name it when one person or seat signs in from several browsers. The token carries only its hash.

Maximum string length: 256

Response

OK

expires_at
string<date-time>
required

The token's expiry, 10 minutes after the mint. The stream closes with : end at this time; mint a new token and reconnect with Last-Event-ID.

stream_url
string
required

The absolute URL of the stream.

token
string
required

The bearer for GET /events/stream. Read-only, this org, this principal, these topics.

topics
string[] | null
required

The topics the token reads.