Skip to main content
POST
Issue a new access token.

Access token concepts

Review token scopes, permissions, expiry, and revocation behavior.
Issued tokens use the scope in this request. Scope fields and auto_prefix_streams are not inherited from the caller, and requested access must be no broader than the caller’s effective permissions. See the token issuance scope rules.
Set network_policy to restrict which networks the token can be used from. See network policies.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Body

application/json
id
string
required

Access token ID. It must be unique to the account and between 1 and 96 bytes in length, and must not contain NUL bytes.

Required string length: 1 - 96
scope
object
required

Access token scope.

auto_prefix_streams
boolean
default:false

Namespace streams based on the configured stream-level scope, which must be a prefix. Stream name arguments will be automatically prefixed, and the prefix will be stripped when listing streams.

expires_at
string<date-time> | null

Expiration time in RFC 3339 format. If not set, the expiration will be set to that of the requestor's token.

network_policy
null | string

Slug or full <slug>.<nonce> reference of a network policy to restrict the token by. A slug binds the token to the policy that currently holds it. If the requestor's token is itself restricted, this must be omitted or name the same policy, which the new token inherits.

Response

access_token
string
required

Created access token.