Consumer Authentication

/

API reference

/

Resources

/

User states

User states

A user's state impacts how they are treated within Stytch, in particular which email template they are sent. Users within Stytch can be in three different states: pending, active, or deleted.

Active: Most users within Stytch will be in the "active" state. When a user is active and they are sent a magic link they will receive a login email template and be routed to the login_magic_link_url or magic_link_url provided in the request.

Pending: Stytch users are created as pending when created via the InviteByEmail endpoint or with endpoints where the create_user_as_pending flag is set to true. Once a user successfully authenticates either a magic link or an OTP code, they are marked as active within the Stytch backend. When inviting a user via the InviteByEmail endpoint the user will receive an email that uses the invite email template. Pending users who receive magic links via the other magic link endpoints will receive an email with the signup email template. Once a user successfully authenticates a magic link from either an invite or signup magic link email, they will be marked as active.

Deleted: Stytch users are marked as deleted when they are deleted via the DeleteUser endpoint. Once a user is deleted, any phone numbers or emails tied to that user are also deleted. You will be unable to send that user magic links or OTP codes.