These routes manage the signed-in person's own second factors. They take the access token in X-Authorization, or a setup token in X-Scute-Setup-Token during a sign-in that requires a factor first (see MFA setup required).
The app decides which factors are allowed (by default totp, sms, email and backup_codes) and whether MFA is disabled, optional or required. To pass an MFA step during sign-in, see Sign-in steps.
Recent verification#
Removing a factor, generating backup codes, and enrolling a factor when the person already has a verified one need a recent verification. The session must have been created within the app's re-verify window (10 minutes by default). Otherwise send challenge: the token of a completed verification challenge of the person's, completed in the last 10 minutes and not used before.
| Status | error_code | When |
|---|---|---|
| 403 | verification_required | No recent sign-in and no challenge. details.recent_sign_in_minutes is the window. |
| 403 | verification_invalid | The challenge is unknown, not the person's, not complete, too old, of the wrong kind, or already used. |
List enrolled factors#
/v1/auth/:app_id/mfa/methodsAccess tokencurl https://api.scute.io/v1/auth/$SCUTE_APP_ID/mfa/methods \ -H "X-Authorization: Bearer $ACCESS_TOKEN"{ "methods": [ { "id": "0193fc30-4e5f-7a6b-8c7d-8e9f0a1b2c3d", "method": "totp", "name": "Authenticator app", "verified": true, "is_default": true, "last_used_at": "2026-11-18T09:12:44Z", "created_at": "2026-10-02T16:20:00Z" } ], "backup_codes_available": 8, "mfa_enabled": true}mfa_enabled is true when the person has at least one verified factor.
Check MFA status#
/v1/auth/:app_id/mfa/statusNoneWith identifier, needs no credential. Without it, send the access token and get the signed-in person's status.
curl "https://api.scute.io/v1/auth/$SCUTE_APP_ID/mfa/status?identifier=ada@example.com"{ "mfa_required": true, "mfa_enabled": true, "available_methods": ["totp", "backup_codes"], "in_grace_period": false}For an identifier with no account, mfa_required reflects the app's policy, mfa_enabled is false and available_methods is empty. An invalid identifier returns 400 invalid_identifier.
Start enrollment#
/v1/auth/:app_id/mfa/enrollAccess tokenCreates an unverified factor. An earlier unverified factor of the same method is replaced.
curl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/mfa/enroll \ -H "X-Authorization: Bearer $ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"method": "totp", "name": "Authenticator app"}'{ "enrollment": { "id": "0193fc30-4e5f-7a6b-8c7d-8e9f0a1b2c3d", "method": "totp", "name": "Authenticator app", "verified": false, "is_default": false, "last_used_at": null, "created_at": "2026-11-19T14:04:05Z" }, "provisioning_uri": "otpauth://totp/Acme:ada%40example.com?secret=JBSWY3DPEHPK3PXP&issuer=Acme", "secret": "JBSWY3DPEHPK3PXP"}For totp, show provisioning_uri as a QR code, or secret for manual entry. Both are returned only here. For sms and email, Scute sends a code to the phone or address.
| Status | error_code | When |
|---|---|---|
| 401 | authentication_required | No valid access token or setup token. |
| 422 | method_not_allowed | The app does not allow the method, or it cannot finish this sign-in. |
| 422 | enrollment_failed | The factor could not be saved, for example the person already has this method. |
Verify enrollment#
/v1/auth/:app_id/mfa/enroll/verifyAccess tokencurl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/mfa/enroll/verify \ -H "X-Authorization: Bearer $ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"enrollment_id": "0193fc30-4e5f-7a6b-8c7d-8e9f0a1b2c3d", "code": "482913"}'Returns { "enrollment": { ... } } with verified: true. With a setup token, it also makes the factor the default, ends the sign-in and returns the token set with enrollment added.
| Status | error_code | When |
|---|---|---|
| 401 | setup_expired | The setup pass expired or was already used. |
| 404 | enrollment_not_found | No factor with that ID for this person. |
| 422 | invalid_code | Wrong code. |
Set the default factor#
/v1/auth/:app_id/mfa/methods/:id/defaultAccess tokenThe default factor is the one a sign-in asks for first.
curl -X PATCH https://api.scute.io/v1/auth/$SCUTE_APP_ID/mfa/methods/$ENROLLMENT_ID/default \ -H "X-Authorization: Bearer $ACCESS_TOKEN"Returns { "enrollment": { ... } }. An unverified factor returns 422 unverified_method.
Remove a factor#
/v1/auth/:app_id/mfa/methods/:idAccess tokenNeeds a recent verification.
curl -X DELETE https://api.scute.io/v1/auth/$SCUTE_APP_ID/mfa/methods/$ENROLLMENT_ID \ -H "X-Authorization: Bearer $ACCESS_TOKEN"Returns 204 with no body. Removing the last verified factor when the app requires MFA returns 422 cannot_remove_last_method.
Generate backup codes#
/v1/auth/:app_id/mfa/backup-codesAccess tokenGenerates 10 new backup codes and replaces any earlier ones. Needs a recent verification.
curl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/mfa/backup-codes \ -H "X-Authorization: Bearer $ACCESS_TOKEN"{ "backup_codes": ["A1B2-C3D4", "9F0E-7D6C", "..."], "message": "Save these codes securely. They will not be shown again."}The codes are returned only in this response. When the app does not allow backup codes, the route returns 422 method_not_allowed.
Errors on every route#
| Status | error_code | When |
|---|---|---|
| 401 | authentication_required | No valid access token or setup token. |
| 403 | impersonating | The session is a support session opened as this person. Factors can't be changed from it. |
| 403 | setup_only | A setup token was sent to a route other than list, enroll or verify enrollment. |