API reference

End-user auth API

The routes under /v1/auth/:app_id that sign people in to your app and manage their sessions.

The end-user auth API is what the Scute SDKs call from the browser and from your server. Every path starts with /v1/auth/:app_id, where :app_id is the app's UUID or its app_xxx public ID.

Credentials#

CredentialHeaderUsed by
NoneStarting a sign-in (magic link, code, passkey, OAuth, SAML), the JWKS, password reset
Access tokenX-Authorization: Bearer <access>The signed-in person's own data: profile, sessions, devices, MFA
Refresh tokenX-Refresh-Token: <refresh>Getting a new access token
App keyAuthorization: Bearer scapp_...Server-side token rotation (rotate_access, force_refresh)
Setup tokenX-Scute-Setup-Token: <setup_token>Adding a second factor or a contact in the middle of a sign-in

Keep the app key on your server. See Authentication for every credential the API accepts.

Sign-in flow#

  1. Start

    Send the identifier to a start route: magic links, one-time codes, passkeys, OAuth providers or SAML SSO.

  2. Finish the first factor

    The person opens the link, types the code or completes the passkey ceremony. The finishing route returns a token set, or the next step the sign-in owes.

  3. Finish any remaining steps

    When the response carries mfa_required, contact_verification_required or verification_required, the sign-in is not done yet. See Sign-in steps.

  4. Keep the session alive

    Send the access token on calls, and swap the refresh token for a new access token before it expires. See Tokens.

Token set#

Every route that completes a sign-in returns the same object.

Response 200json
{  "csrf": "kZQ3x0Qb7V1o2y8wL4mN9pR6sT0uV3wX5yZ7aB9cD1eF",  "access": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ii4uLiJ9...",  "access_expires_at": "2026-11-19T15:04:05.000+00:00",  "refresh": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ii4uLiJ9...",  "refresh_expires_at": "2026-11-26T14:04:05.000+00:00",  "key_id": "f3b1c2d4e5",  "user_id": "0193f900-aaaa-7bbb-8ccc-eeeeeeeeeeee"}
FieldDescription
csrfCSRF token for the session. Scute checks it in X-CSRF-Token only when a token is sent in a cookie.
accessAccess token (JWT, RS256). Lifetime is the app's access expiration, 3600 seconds by default.
access_expires_atWhen the access token expires.
refreshRefresh token (JWT). Lifetime is the app's refresh expiration, 604800 seconds (7 days) by default. Left out when the app has refresh tokens in the response turned off.
refresh_expires_atWhen the refresh token expires. Left out with refresh.
key_idkid of the workspace key that signed the tokens.
user_idThe app user's ID.

A sign-in may add these fields next to the tokens:

FieldWhen
mfa_enrollment_suggestedtrue when the app asks the person to set up a second factor.
mfa_grace_days_remainingDays left before a second factor is required.
mfa_factor_not_allowedtrue when the person's factors are not ones the app allows.
available_methodsThe second factors the person can set up.

Sign-in refusals#

Every start and finish route checks the same rules before it sends anything or issues a session.

Statuserror_codeReason
400invalid_identifierThe email or phone is not valid.
403ip_blockedThe workspace's IP rules block the caller's address.
403country_blockedThe workspace's IP rules block the caller's country.
403sso_requiredThe email's domain is verified for SAML with SSO enforced. details.sso_login_url has the SSO start URL.
403signup_disabledPublic sign-up is off and the identifier has no account in this app.
403account_deactivatedThe person was deactivated.
403user_bannedThe person is banned.
403user_suspendedThe person is suspended.
403security_blockAttack protection refused the sign-in.
403sign_in_method_disabledThe app has this way of signing in turned off. details.method names it.
422incomplete_user_infoRequired user fields are missing. details.required_fields lists them.

When sign-up is closed, the magic link and code start routes answer an identifier that has no account with the same 200 a known identifier gets, so the answer does not reveal which accounts exist.

Pages#

Magic links
Send a sign-in link and exchange it for a session.
One-time codes
Send a code by email or SMS and verify it.
Passkeys
WebAuthn sign-in, sign-up and device management.
OAuth providers
Sign in with Google, GitHub, Microsoft and others.
SAML SSO
Find the SSO connection for an email and start the SAML sign-in.
Sign-in steps
MFA, contact confirmation and security verification during sign-in.
MFA
Enroll, list and remove second factors, and backup codes.
Tokens
Refresh, verify and rotate tokens.
JWKS
Verify access tokens offline.
Current user
Profile, user meta, alternate phones, sign out.
Sessions and devices
Sessions, trusted devices and connected apps.