API reference

Sessions and devices

List, rename and revoke the signed-in person's sessions, manage trusted devices and connected apps, and open a support session.

These routes act on the person behind the access token. Renaming and revoking sessions, trusting devices and revoking connected apps are refused in a support session (403 impersonating).

Sessions#

List sessions#

GET/v1/auth/:app_id/sessionsAccess token
cURLbash
curl https://api.scute.io/v1/auth/$SCUTE_APP_ID/sessions \  -H "X-Authorization: Bearer $ACCESS_TOKEN"
Response 200json
[  {    "id": "0193fd40-5f6a-7b7c-8d8e-9f0a1b2c3d4e",    "created_at": "2026-11-19T14:04:05.000Z",    "updated_at": "2026-11-19T14:04:05.000Z",    "last_used_at": "2026-11-19T14:30:12.000Z",    "last_used_at_ip": "203.0.113.24",    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ...",    "display_name": null,    "refresh_expiration": "2026-11-26T14:04:05.000Z",    "access_expiration": null,    "credential_id": null,    "client_name": null,    "short_token_preview": null,    "short_token": null,    "scopes": null,    "expires_at": null,    "current": true,    "status": true,    "type": "magic",    "platform": "Mac 10.15.7",    "browser": "Chrome 131.0.0.0",    "user_agent_shortname": "Chrome 131.0.0.0 / Mac 10.15.7",    "nickname": "Chrome 131.0.0.0 / Mac 10.15.7"  }]
FieldDescription
display_nameThe name the person gave the session, or null.
refresh_expirationWhen the session's refresh token expires.
credential_idThe WebAuthn credential ID, on sessions started with a passkey.
currenttrue for the session behind the access token used for this call.
statustrue while the refresh token has not expired.
typeHow the session started: magic, otp, webauthn, xlogin (picked up on another device), oauth, mfa, challenge, workspace, misc or impersonation.

See Session for the object.

Rename a session#

PATCH/v1/auth/:app_id/sessions/:idAccess token
session.display_namestringrequired
The new name.
cURLbash
curl -X PATCH https://api.scute.io/v1/auth/$SCUTE_APP_ID/sessions/$SESSION_ID \  -H "X-Authorization: Bearer $ACCESS_TOKEN" \  -H "Content-Type: application/json" \  -d '{"session": {"display_name": "Home laptop"}}'

Returns the session object.

Statuserror_codeWhen
404session_not_foundNot one of the person's sessions.
422session_update_failedThe name could not be saved.

Revoke a session#

DELETE/v1/auth/:app_id/sessions/:idAccess token

Ends one of the person's sessions. Its tokens stop working.

cURLbash
curl -X DELETE https://api.scute.io/v1/auth/$SCUTE_APP_ID/sessions/$SESSION_ID \  -H "X-Authorization: Bearer $ACCESS_TOKEN"
Response 200json
{ "message": "ok", "verified": true }

Returns 404 session_not_found when the session is not the person's.

Sign out everywhere else#

POST/v1/auth/:app_id/sessions/revoke_othersAccess token

Ends every session of the person except the current one.

cURLbash
curl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/sessions/revoke_others \  -H "X-Authorization: Bearer $ACCESS_TOKEN"
Response 200json
{ "message": "ok", "verified": true, "revoked": 3 }

Trusted devices#

When the app allows device trust, a person can trust the device they signed in from. A device is recognized by the fingerprint the browser sends in X-Fingerprint at sign-in.

List devices#

GET/v1/auth/:app_id/trusted_devicesAccess token
Response 200json
{  "devices": [    {      "id": "0193fe50-6a7b-7c8d-8e9f-0a1b2c3d4e5f",      "label": "Chrome on macOS",      "city": "Berlin",      "country_code": "DE",      "first_seen_at": "2026-10-02T16:20:00Z",      "last_seen_at": "2026-11-19T14:04:05Z",      "trusted": true,      "trusted_at": "2026-11-01T09:00:00Z",      "trust_expires_at": "2026-12-01T09:00:00Z",      "current": true    }  ],  "current_device": {    "id": "0193fe50-6a7b-7c8d-8e9f-0a1b2c3d4e5f",    "trusted": true,    "can_trust": true,    "reason": null  },  "device_trust": { "enabled": true, "days": 30 }}

current_device.reason says why the current device can't be trusted: device_trust_off, second_factor_required or device_unknown.

Trust this device#

POST/v1/auth/:app_id/trusted_devicesAccess token

Trusts the device the current session signed in from. Returns 201 with { "device": { ... } }.

Statuserror_codeWhen
403device_trust_offThe app does not let people trust devices.
403second_factor_requiredThe session did not pass a second factor.
422device_unknownThe sign-in sent no device fingerprint.

Stop trusting a device#

DELETE/v1/auth/:app_id/trusted_devices/:idAccess token

Returns { "device": { ... } } with trusted: false, or 404 device_not_found.

Connected apps#

The OAuth clients (for example MCP clients) the person allowed to act for them through the app's OAuth authorization server.

List connected apps#

GET/v1/auth/:app_id/oauth/grantsAccess token
Response 200json
{  "grants": [    {      "id": "0193ff60-7b8c-7d9e-8f0a-1b2c3d4e5f6a",      "client": { "name": "Claude", "uri": "https://claude.ai", "logo_uri": null },      "resource": "https://mcp.example.com/mcp",      "resource_name": "Example MCP",      "scopes": [],      "created_at": "2026-11-10T12:00:00.000Z",      "last_used_at": "2026-11-19T13:58:00.000Z",      "active": true,      "revoked_at": null,      "revoked_reason": null    }  ]}

Newest first, active and revoked, up to 200.

Revoke a connected app#

POST/v1/auth/:app_id/oauth/grants/:id/revokeAccess token

Revokes the grant and returns it, with active: false and revoked_reason user_revoked. An unknown grant returns 404 grant_not_found.

Support sessions#

An administrator can open a session as a person from the dashboard ("Sign in as this user"). The dashboard hands your app a one-time code, which your app swaps for the session.

Exchange a hand-off code#

POST/v1/auth/:app_id/impersonation/exchangeNone
codestringrequired
The hand-off code from the link.
cURLbash
curl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/impersonation/exchange \  -H "Content-Type: application/json" \  -d '{"code": "'"$HANDOFF_CODE"'"}'

Returns the token set without a refresh token, plus session_id and impersonation (who is acting). The session is short and can't be refreshed. While it lasts, the person's passkeys, factors, alternate phones, sessions and trusted devices can't be changed through it.

Statuserror_codeWhen
422handoff_invalidThe code is unknown, used, expired, for another app, or its session is over.
429More than 20 exchanges from one IP address in a minute.