API reference

The session object

A sign-in session or M2M token, and the token set Scute returns when one is created.

A session is created at each sign-in (magic link, OTP, passkey, OAuth, SAML and the other methods) and for each M2M token. It holds the refresh token and tracks where the session was last used. Two shapes appear in the API: the token set returned when a session starts, and the session object returned when sessions are listed.

The token set#

Returned when a user signs in or a session is refreshed. The auth API pages say which call returns it.

FieldTypeDescription
accessstringThe access token: an RS256 JWT. Send it in X-Authorization: Bearer.
access_expires_atstringWhen the access token expires.
refreshstringThe refresh token. Left out when the app does not return refresh tokens in the payload.
refresh_expires_atstringWhen the refresh token expires. Left out with refresh.
csrfstringCSRF token. Sent as X-CSRF-Token with a refresh.
key_idstringkid of the key that signed the tokens, as published in the app's JWKS.
user_idstringUUID of the app user.
Token setjson
{  "csrf": "kQ2...",  "access": "eyJhbGciOiJSUzI1NiIsImtpZCI6...",  "access_expires_at": "2026-11-18T11:00:00.000Z",  "refresh": "eyJhbGciOiJSUzI1NiIsImtpZCI6...",  "refresh_expires_at": "2026-11-25T10:00:00.000Z",  "key_id": "...",  "user_id": "0193f900-aaaa-bbbb-cccc-eeeeeeeeeeee"}

The access token's payload carries uuid (the app user's UUID), aid (the app's public id), wid (the workspace UUID) and, for users of an MSP's workspace, msp_id.

M2M token set#

POST /v1/apps/:app_id/m2m/token returns the same fields without user_id, plus:

FieldTypeDescription
short_tokenstringThe opaque scm2m_... token. Shown once.
client_namestringThe name given to the token.
scopesarrayread, write or both.
expires_atstringWhen the token stops working.

The session object#

Returned by the session lists: GET /v1/auth/:app_id/sessions (the signed-in user's own), GET /v1/:app_id/users/:id/sessions (one user's, for the app's backend), GET /v1/apps/:app_id/m2m/sessions (the app's M2M tokens), and in sessions of the detailed user object.

FieldTypeDescription
idstringUUID of the session.
typestringHow it started: webauthn, magic, xlogin, oauth, misc, otp, workspace, m2m, mfa, challenge or impersonation.
statusbooleantrue while the refresh token has not expired.
currentbooleantrue for the session behind the caller's access token.
display_namestringName the user gave the session, or null.
user_agentstringUser agent at sign-in.
platformstringOperating system read from the user agent, or null.
browserstringBrowser read from the user agent, or null.
user_agent_shortnamestringShort name built from the user agent.
nicknamestringSame value as user_agent_shortname.
credential_idstringWebAuthn credential id, for passkey sessions.
last_used_atstringLast use of the session.
last_used_at_ipstringAddress of the last use.
refresh_expirationstringWhen the refresh token expires.
access_expirationstringM2M only: when the token expires.
client_namestringM2M only: the token's name.
short_token_previewstringM2M only: first and last characters of the scm2m_ token. The full token is never listed.
short_tokenstringM2M only: a masked preview, kept for older clients.
scopesarrayM2M only: read, write or both.
expires_atstringM2M only: when the token stops working.
created_at, updated_atstringISO 8601 times.
Sessionjson
{  "id": "0193f950-1111-7222-8333-444444444444",  "type": "magic",  "status": true,  "current": false,  "display_name": null,  "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ...",  "credential_id": null,  "last_used_at": "2026-11-18T10:00:00.000Z",  "last_used_at_ip": "203.0.113.7",  "refresh_expiration": "2026-11-25T10:00:00.000Z",  "access_expiration": null,  "client_name": null,  "scopes": null,  "expires_at": null,  "created_at": "2026-11-18T09:58:00.000Z",  "updated_at": "2026-11-18T10:00:00.000Z"}

The example shows a subset of the fields.