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#
/v1/auth/:app_id/sessionsAccess tokencurl https://api.scute.io/v1/auth/$SCUTE_APP_ID/sessions \ -H "X-Authorization: Bearer $ACCESS_TOKEN"[ { "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" }]| Field | Description |
|---|---|
| display_name | The name the person gave the session, or null. |
| refresh_expiration | When the session's refresh token expires. |
| credential_id | The WebAuthn credential ID, on sessions started with a passkey. |
| current | true for the session behind the access token used for this call. |
| status | true while the refresh token has not expired. |
| type | How 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#
/v1/auth/:app_id/sessions/:idAccess tokencurl -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.
| Status | error_code | When |
|---|---|---|
| 404 | session_not_found | Not one of the person's sessions. |
| 422 | session_update_failed | The name could not be saved. |
Revoke a session#
/v1/auth/:app_id/sessions/:idAccess tokenEnds one of the person's sessions. Its tokens stop working.
curl -X DELETE https://api.scute.io/v1/auth/$SCUTE_APP_ID/sessions/$SESSION_ID \ -H "X-Authorization: Bearer $ACCESS_TOKEN"{ "message": "ok", "verified": true }Returns 404 session_not_found when the session is not the person's.
Sign out everywhere else#
/v1/auth/:app_id/sessions/revoke_othersAccess tokenEnds every session of the person except the current one.
curl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/sessions/revoke_others \ -H "X-Authorization: Bearer $ACCESS_TOKEN"{ "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#
/v1/auth/:app_id/trusted_devicesAccess token{ "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#
/v1/auth/:app_id/trusted_devicesAccess tokenTrusts the device the current session signed in from. Returns 201 with { "device": { ... } }.
| Status | error_code | When |
|---|---|---|
| 403 | device_trust_off | The app does not let people trust devices. |
| 403 | second_factor_required | The session did not pass a second factor. |
| 422 | device_unknown | The sign-in sent no device fingerprint. |
Stop trusting a device#
/v1/auth/:app_id/trusted_devices/:idAccess tokenReturns { "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#
/v1/auth/:app_id/oauth/grantsAccess token{ "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#
/v1/auth/:app_id/oauth/grants/:id/revokeAccess tokenRevokes 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#
/v1/auth/:app_id/impersonation/exchangeNonecurl -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.
| Status | error_code | When |
|---|---|---|
| 422 | handoff_invalid | The code is unknown, used, expired, for another app, or its session is over. |
| 429 | More than 20 exchanges from one IP address in a minute. |