Skip to main content
POST
Mint session token

Authorizations

Authorization
string
header
required

Organization API key, generated in studio.sidenet.ai. Backend only — never in a browser.

Body

application/json
user_id
string
required

Your stable id for the end user. Becomes their identity on every call this token makes. An id that hasn't been seen before CREATES the user — name them via PATCH /v1/users/{userId}, or pre-create with POST /v1/users.

Example:

"user_4821"

group_id
string

The group this session belongs to — today the unit billing and spend caps attach to. An id that hasn't been seen before CREATES the group, with the default spend cap — name and cap it via PATCH /v1/groups/{groupId}, or pre-create with POST /v1/groups. Optional: when omitted, the session uses the user's current group (set by a previous mint, chat call, or PATCH /v1/users/{userId}), falling back to the organization's Default group. Send it explicitly if you bill per team — the fallback is silent.

Example:

"grp_84f20c19"

tools_auth
object

Per-provider credentials, keyed by tool provider id — { "PROVIDER_ID": { "credentials": { … }, "base_url"?: "…" } }. Stored on the user (encrypted at rest) and injected server-side on every call they make — sessions, workflow runs and schedules alike. Only the providers you send are replaced. Never returned, logged, or cached.

Example:

Response

Session created

access_token
string

Bearer token for the chat runtime. Prefixed snat_.

refresh_token
string

Single-use token for POST /v1/token/refresh. Prefixed snrt_.

token_type
string
Example:

"Bearer"

expires_in
number

Access token lifetime in seconds.

refresh_expires_in
number

Refresh token lifetime in seconds.