/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference List Sessions

List Sessions

List the browser and stx CLI sessions signed in to your account.

GET/v1/auth/sessionsTry it
Session token

Returns every live session on your account — each signed-in browser and each stx login — with the current session first, then the most recently used. Use it to spot a sign-in you don't recognise, then revoke it.

Note

Requires a session JWT — a dashboard session or an stx login token. API keys are rejected with 401. You only ever see your own sessions. Any plan.

Session fields

NameDescription
id:stringbody
The session id. Pass it to Revoke Session. It stays the same for the life of the session — refreshing a browser session does not change it. Access tokens carry it as the sid claim.
kind:stringbody
browser for a dashboard sign-in, cli for an stx login token.
name:stringbody
A label derived from the user agent — e.g. "Chrome · macOS", or "Unknown browser" when the browser can't be recognised. CLI sessions are "stx CLI", or "stx CLI · macOS" when the client sends a stx/<version> (<platform>; <arch>) user agent.
detail:stringbody
A second line for display: "Web dashboard · <ip>" for browsers. For the CLI, "stx <version>" when the client sent its version, otherwise "stx CLI · <ip>". The address is left out when it isn't known.
userAgent:string | nullbody
The user agent recorded when the session was created.
ip:string | nullbody
The client address recorded when the session was created. Display only — Syntext never uses it for access decisions. There is no geolocation.
createdAt:stringbody
When the session began (the original sign-in, not the latest token refresh).
lastUsedAt:stringbody
When the session last made a request. Updated at most every 5 minutes.
lastActiveAt:stringbody
Same value as lastUsedAt.
current:booleanbody
true for the session that made this request.
Note

stx CLI tokens issued before sessions existed don't appear in this list. They are signed out by Revoke Other Sessions, a password change, or signing out everywhere — see Sessions.

Error Responses

401 Unauthorized

Returned with unauthorized when the Authorization header is missing, the token is invalid or expired, or you sent an API key. Returned with session_revoked when the session behind the token has been signed out:

json
{
"error": {
"code": "session_revoked",
"message": "This session has been signed out. Sign in again.",
"details": { "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}
Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl https://api.syntext.dev/v1/auth/sessions \
-H "Authorization: Bearer $SYNTEXT_JWT"
Responseapplication/json
200OK
{
"data": [
{
"id": "8d1f6a52-4c3e-4b8a-9f0d-2e7c1b5a9d34",
"kind": "browser",
"name": "Chrome · macOS",
"detail": "Web dashboard · 203.0.113.9",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
"ip": "203.0.113.9",
"createdAt": "2026-11-01T09:12:00.000Z",
"lastUsedAt": "2026-11-08T14:03:00.000Z",
"lastActiveAt": "2026-11-08T14:03:00.000Z",
"current": true
},
{
"id": "c47e0b19-7a2d-4f61-8e35-6b90d2a1f7c8",
"kind": "cli",
"name": "stx CLI",
"detail": "stx CLI · 198.51.100.23",
"userAgent": "Bun/1.2.19",
"ip": "198.51.100.23",
"createdAt": "2026-10-20T16:40:00.000Z",
"lastUsedAt": "2026-11-07T11:25:00.000Z",
"lastActiveAt": "2026-11-07T11:25:00.000Z",
"current": false
}
]
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext