Any route that completes a first factor (magic link, code, passkey, OAuth, SAML, invitation) can answer with a step instead of a token set. Check the response for these fields before you look for access:
| Field | Status | Step |
|---|---|---|
| contact_verification_required | 200 | The app wants the person's email or phone confirmed first. |
| mfa_required with mfa_challenge | 200 | A second factor is required. |
| mfa_required with mfa_enrollment_required | 200 | A second factor is required and the person has none that counts. |
| verification_required | 202 | Attack protection wants a code from this device. |
The steps run in that order: contact first, then MFA.
MFA challenge#
{ "mfa_required": true, "app_user_id": "0193f900-aaaa-7bbb-8ccc-eeeeeeeeeeee", "mfa_challenge": { "token": "ch_Qm3nB5vC7xZ9aS1dF3gH5jK7lP9oI2uY", "status": "pending", "purpose": "mfa", "method": "totp", "expires_at": "2026-11-19T14:14:05Z", "remaining_attempts": 3, "time_remaining": 600, "delivery_required": false }, "available_methods": ["totp", "sms", "backup_codes"]}mfa_challenge.method is the person's default factor. available_methods lists the factors the person can use for this sign-in.
Finish it with the challenge verify route. No app key is needed for an MFA challenge that belongs to a sign-in:
curl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/challenges/$MFA_TOKEN/verify \ -H "Content-Type: application/json" \ -d '{"code": "482913"}'A correct code returns the token set.
MFA setup required#
When MFA is required and the person has no factor that counts (and any grace period is over), the sign-in returns a setup pass instead of a session:
{ "mfa_required": true, "mfa_enrollment_required": true, "app_user_id": "0193f900-aaaa-7bbb-8ccc-eeeeeeeeeeee", "available_methods": ["totp", "sms"], "setup_token": "scsetup_8fK2mQ4rT6vX8zA0cE2gI4kM6oQ8sU0wYb3nD5fH7jL9", "setup_expires_at": "2026-11-19T14:19:05Z"}Send setup_token in the X-Scute-Setup-Token header (or as setup_token in the body) to Start enrollment and Verify enrollment. Verifying the new factor ends the sign-in and returns the token set. The pass works only on those MFA routes and on List enrolled factors; any other MFA route returns 403 setup_only.
When the app allows no second factor that can follow the first factor used, the sign-in returns 403 mfa_method_unavailable. Change the app's allowed MFA methods.
Contact confirmation#
Apps can require a confirmed email or phone before the first session.
When the person has the contact on file, Scute sends a code to it:
{ "contact_verification_required": true, "field": "phone", "app_user_id": "0193f900-aaaa-7bbb-8ccc-eeeeeeeeeeee", "challenge": { "token": "ch_Lk8jH6gF4dS2aQ0wE9rT7yU5iO3pZ1xC", "status": "pending", "purpose": "verify_contact", "method": "sms_otp", "expires_at": "2026-11-19T14:14:05Z", "remaining_attempts": 3, "time_remaining": 600, "delivery_required": false }}Verify the code with POST /v1/auth/:app_id/challenges/:token/verify and {"code": "..."}, as for MFA. The sign-in then goes on.
When the person has no contact of that kind, the response carries setup_token and setup_expires_at instead of challenge. Ask for the email or phone and add it:
Add the contact#
/v1/auth/:app_id/sign_in/contactSetup tokencurl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/sign_in/contact \ -H "X-Scute-Setup-Token: $SETUP_TOKEN" \ -H "Content-Type: application/json" \ -d '{"identifier": "+14155551234"}'{ "field": "phone", "challenge": { "token": "ch_Lk8jH6gF4dS2aQ0wE9rT7yU5iO3pZ1xC", "status": "pending", "purpose": "verify_contact", "method": "sms_otp", "expires_at": "2026-11-19T14:14:05Z", "remaining_attempts": 3, "time_remaining": 600, "delivery_required": false }}Verify the code with the challenge verify route. The contact is added to the account as confirmed and the sign-in goes on. One setup pass sends up to 3 codes.
| Status | error_code | When |
|---|---|---|
| 400 | invalid_identifier | Not a valid email or phone, or not the kind field asks for. |
| 401 | setup_expired | The setup pass expired or was used. Sign in again. |
| 409 | contact_taken | Another person in the workspace has that email or phone. |
| 422 | sms_unavailable | SMS is off for the workspace. |
| 422 | sms_country_not_allowed | The app does not allow texts to this country. |
| 429 | setup_send_limit | Three codes were already sent for this pass. Sign in again. |
Security verification#
Attack protection can ask for a code when a sign-in comes from a new device or address:
{ "verification_required": true, "reason": "security_verification", "threats": ["new_device"], "verification": { "token": "ch_Wq2eR4tY6uI8oP0aS2dF4gH6jK8lZ0xC", "method": "email_otp", "expires_at": "2026-11-19T14:14:05Z" }}Verify the code with POST /v1/auth/:app_id/challenges/:token/verify (no app key needed). The device and address are then known: repeat the original finishing call (open the same link again, or poll again) to get the session.
A sign-in attack protection refuses outright returns 403 security_block.