These endpoints look after one user's sign-in security when they can't do it themselves: a lost phone, a lockout, a session left open. They take the app key (or a workspace key above the app). None of them asks the user for a recent sign-in.
A user protected from impersonation (one of the app's impersonation_protected_roles) can't be changed here: the call returns 403 protected_user. Changes record an event, and the user gets an email for a removed method, a reset, new backup codes and a device trusted again.
Common errors:
| Status | error_code | When |
|---|---|---|
| 404 | user_not_found | No user with that ID in the app |
| 403 | protected_user | The user is protected |
| 403 | workspace_admin_required | A signed-in team member who is not an owner or admin |
The MFA endpoints return the user's MFA state:
{ "mfa_enabled": true, "enrollments": [ { "id": "0193fa10-1111-7222-8333-444444444444", "method": "totp", "name": "Authenticator app", "verified": true, "is_default": true, "last_used_at": "2026-11-18T09:12:00Z", "created_at": "2026-10-01T10:00:00Z" } ], "backup_codes_remaining": 8, "backup_codes_total": 10}MFA#
Reset MFA#
Removes every MFA method and backup code. With MFA required, the user sets it up again at the next sign-in.
/v1/:app_id/users/:id/mfaApp keycurl -X DELETE https://api.scute.io/v1/$SCUTE_APP_ID/users/0193f900-aaaa-bbbb-cccc-eeeeeeeeeeee/mfa \ -H "Authorization: Bearer $SCUTE_APP_SECRET"Returns 200 with the MFA state.
Remove an MFA method#
Removes one method, the last one too. When the default goes, the user's oldest other verified method becomes the default.
/v1/:app_id/users/:id/mfa/methods/:method_idApp keyReturns 200 with the MFA state, or 404 enrollment_not_found.
Set the default MFA method#
/v1/:app_id/users/:id/mfa/methods/:method_id/defaultApp keyReturns 200 with the MFA state. 422 unverified_method when the user did not finish setting the method up.
Create backup codes#
New codes replace the old unused ones. The codes are in this response only.
/v1/:app_id/users/:id/mfa/backup_codesApp key{ "backup_codes": ["4F7A-29C1", "8E3B-61D0"], "mfa": { "mfa_enabled": true, "enrollments": [], "backup_codes_remaining": 10, "backup_codes_total": 10 }, "message": "Give these to the person securely. They won't be shown again."}Returns 422 method_not_allowed when the app does not allow backup codes.
Sessions#
End all sessions#
Signs the user out everywhere.
/v1/:app_id/users/:id/sessionsApp keycurl -X DELETE https://api.scute.io/v1/$SCUTE_APP_ID/users/0193f900-aaaa-bbbb-cccc-eeeeeeeeeeee/sessions \ -H "Authorization: Bearer $SCUTE_APP_SECRET"{ "ended": 3 }Each ended session records a session.revoked event.
Trusted devices#
A trusted device skips attack protection's untrusted device check for the app's device_trust_days. See Attack protection.
Trust a device again#
Trusts a device the user has signed in from, for device_trust_days from now.
/v1/:app_id/users/:id/trusted_devices/:device_idApp keycurl -X POST https://api.scute.io/v1/$SCUTE_APP_ID/users/0193f900-aaaa-bbbb-cccc-eeeeeeeeeeee/trusted_devices/0193fa20-1111-7222-8333-444444444444 \ -H "Authorization: Bearer $SCUTE_APP_SECRET"{ "device": { "id": "0193fa20-1111-7222-8333-444444444444", "fingerprint_hash": "c1f0...", "ip_address": "198.51.100.20", "country_code": "US", "city": "Austin", "latitude": 30.27, "longitude": -97.74, "login_count": 14, "first_seen_at": "2026-09-02T08:00:00Z", "last_seen_at": "2026-11-18T09:12:00Z", "trusted": true, "trusted_at": "2026-11-19T14:00:00Z", "trust_expires_at": "2026-12-19T14:00:00Z", "label": "Chrome on macOS" }}Returns 404 device_not_found, or 422 device_trust_off when the app has trusted devices off.
Stop trusting a device#
The user's next sign-in from it gets the untrusted device check again.
/v1/:app_id/users/:id/trusted_devices/:device_idApp keyReturns 200 with device in the shape above, or 404 device_not_found.
The signed-in user's trusted devices#
These take the user's access token in X-Authorization. An M2M token is refused: it has no person. Trusting and untrusting are refused while someone is signed in as the user (403 impersonating).
List the user's devices#
/v1/auth/:app_id/trusted_devicesAccess tokencurl https://api.scute.io/v1/auth/$SCUTE_APP_ID/trusted_devices \ -H "X-Authorization: Bearer $ACCESS_TOKEN"{ "devices": [ { "id": "0193fa20-1111-7222-8333-444444444444", "label": "Chrome on macOS", "city": "Austin", "country_code": "US", "first_seen_at": "2026-09-02T08:00:00Z", "last_seen_at": "2026-11-18T09:12:00Z", "trusted": false, "trusted_at": null, "trust_expires_at": null, "current": true } ], "current_device": { "id": "0193fa20-1111-7222-8333-444444444444", "trusted": false, "can_trust": true, "reason": null }, "device_trust": { "enabled": true, "days": 30 }}Up to 100 devices, most recently seen first. current_device.reason says why the current device can't be trusted: device_trust_off, second_factor_required or device_unknown.
Trust the current device#
Trusts the device this session signed in from. The session must come from a sign-in that passed a second factor.
/v1/auth/:app_id/trusted_devicesAccess tokenReturns 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 one of the user's devices#
/v1/auth/:app_id/trusted_devices/:idAccess tokenReturns 200 with device, or 404 device_not_found.