API reference

User sessions

List a user's sessions and end one or all of them from your server.

A session is created at each sign-in and holds the user's access and refresh tokens. Ending a session makes its tokens stop working at once. These routes take the app key (or a workspace key above the app). A signed-in user reads their own sessions through the auth API instead.

The session fields are described on the session object.

List a user's sessions#

GET/v1/:app_id/users/:id/sessionsApp key

Returns every session of the user, as an array.

cURLbash
curl https://api.scute.io/v1/$SCUTE_APP_ID/users/$USER_ID/sessions \  -H "Authorization: Bearer $SCUTE_APP_SECRET"
Response 200json
[  {    "id": "0193f950-1234-7abc-8def-001122334455",    "created_at": "2026-11-18T09:12:44.000Z",    "updated_at": "2026-11-18T09:40:02.000Z",    "last_used_at": "2026-11-18T09:40:02.000Z",    "last_used_at_ip": "203.0.113.7",    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ...",    "display_name": null,    "refresh_expiration": "2026-11-25T09:12:44.000Z",    "credential_id": null,    "current": false,    "status": true,    "type": "magic",    "platform": "Mac 10.15.7",    "browser": "Chrome 131.0.0.0"  }]

The example shows a subset of the fields. status is true while the refresh token has not expired.

StatusWhen
404No user with that id.

End one session#

DELETE/v1/:app_id/users/:id/sessions/:session_idApp key
cURLbash
curl -X DELETE https://api.scute.io/v1/$SCUTE_APP_ID/users/$USER_ID/sessions/$SESSION_ID \  -H "Authorization: Bearer $SCUTE_APP_SECRET"
Response 200json
{ "message": "ok", "verified": true }
StatusWhen
404No user with that id, or the user has no session with that id.

End every session#

DELETE/v1/:app_id/users/:id/sessionsApp key

Signs the user out everywhere. Each ended session is recorded as a session.revoked event.

cURLbash
curl -X DELETE https://api.scute.io/v1/$SCUTE_APP_ID/users/$USER_ID/sessions \  -H "Authorization: Bearer $SCUTE_APP_SECRET"
Response 200json
{ "ended": 3 }
StatusErrorWhen
403protected_userThe user is protected from being signed in as (see Impersonation), so an admin cannot change their sign-in security.
404user_not_foundNo user with that id.

Deactivating a user also ends every session.