Stytch API
The Stytch API provides endpoints for authentication and user management.
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
The Stytch API provides endpoints for authentication and user management.
Endpoints 184
Connected Apps
- GETGet
/v1/connected_apps/clients/:client_idRetrieve details of a specific Connected App by client_id. - PUTUpdate
/v1/connected_apps/clients/:client_idUpdates mutable fields of a Connected App. Cannot update Client Type, Client ID, or Secrets. - DELETEDelete
/v1/connected_apps/clients/:client_idDeletes a Connected App. - POSTSearch
/v1/connected_apps/clients/searchSearch for Connected Apps. Supports cursor-based pagination. Specific filters coming soon. - POSTCreate
/v1/connected_apps/clientsCreates a new Connected App. If the Connected App client_type is first_party or third_party a client_secret is returned. Important: This is the only time you…
Clients
- POSTRotatestart
/v1/connected_apps/clients/:client_id/secrets/rotate/startInitiate the rotation of a Connected App client secret. After this endpoint is called, both the client's client_secret and next_client_secret will be valid.… - POSTRotatecancel
/v1/connected_apps/clients/:client_id/secrets/rotate/cancelCancel the rotation of a Connected App client secret started with the Start Secret Rotation Endpoint. After this endpoint is called, the client's… - POSTRotate
/v1/connected_apps/clients/:client_id/secrets/rotateComplete the rotation of a Connected App client secret started with the Rotate Secret Start Endpoint. After this endpoint is called, the client's… - POSTRotatestart
/v1/m2m/clients/:client_id/secrets/rotate/startInitiate the rotation of an M2M client secret. After this endpoint is called, both the client's client_secret and next_client_secret will be valid. To… - POSTRotatecancel
/v1/m2m/clients/:client_id/secrets/rotate/cancelCancel the rotation of an M2M client secret started with the Start Secret Rotation Endpoint Start Secret Rotation Endpoint. After this endpoint is called, the… - POSTRotate
/v1/m2m/clients/:client_id/secrets/rotateComplete the rotation of an M2M client secret started with the Start Secret Rotation Endpoint Start Secret Rotation Endpoint. After this endpoint is called,…
B2B Scim
- GETGetgroups
/v1/b2b/scim/:organization_id/connection/:connection_id?cursor=string&limit=0Gets a paginated list of all SCIM Groups associated with a given Connection. - PUTUpdate
/v1/b2b/scim/:organization_id/connection/:connection_idUpdate a SCIM Connection. - DELETEDelete
/v1/b2b/scim/:organization_id/connection/:connection_idDeletes a SCIM Connection. - POSTRotatestart
/v1/b2b/scim/:organization_id/connection/:connection_id/rotate/startStart a SCIM token rotation. - POSTRotatecomplete
/v1/b2b/scim/:organization_id/connection/:connection_id/rotate/completeCompletes a SCIM token rotation. This will complete the current token rotation process and update the active token to be the new token supplied in the start… - POSTRotatecancel
/v1/b2b/scim/:organization_id/connection/:connection_id/rotate/cancelCancel a SCIM token rotation. This will cancel the current token rotation process, keeping the original token active. - GETGet
/v1/b2b/scim/:organization_id/connectionGet SCIM Connection. - POSTCreate
/v1/b2b/scim/:organization_id/connectionCreate a new SCIM Connection.
Organization
- POSTCreate
/v1/b2b/organizationsCreates an Organization. An organization_name and a unique organization_slug are required. If no Organization authentication setting parameters are passed in,… - GETGet
/v1/b2b/organizations/:organization_idReturns an Organization specified by organization_id. - PUTUpdate
/v1/b2b/organizations/:organization_idUpdates an Organization specified by organization_id. An Organization must always have at least one auth setting set to either RESTRICTED or ALL_ALLOWED in… - DELETEDelete
/v1/b2b/organizations/:organization_idDeletes an Organization specified by organization_id. All Members of the Organization will also be deleted. - POSTSearch
/v1/b2b/organizations/searchWarning: This endpoint is not recommended for use in login flows. Scaling issues may occur, as search performance may vary from ~150 milliseconds to 9 seconds… - GETMetrics
/v1/b2b/organizations/:organization_id/metrics - GETConnectedapps
/v1/b2b/organizations/:organization_id/connected_appsRetrieves a list of Connected Apps for the Organization that have been installed by Members. Installation comprises successful completion of an authorization… - GETGetconnectedapp
/v1/b2b/organizations/:organization_id/connected_apps/:connected_app_idGet Connected App for Organization retrieves information about the specified Connected App as well as a list of the Organization's Members who have the App… - DELETEDeleteexternalid
/v1/b2b/organizations/:organization_id/external_id
Organizations
- PUTUpdate
/v1/b2b/organizations/:organization_id/members/:member_idUpdates a Member specified by organization_id and member_id. - DELETEDelete
/v1/b2b/organizations/:organization_id/members/:member_idDeletes a Member specified by organization_id and member_id. - PUTReactivate
/v1/b2b/organizations/:organization_id/members/:member_id/reactivateReactivates a deleted Member's status and its associated email status (if applicable) to active, specified by organization_id and member_id. This endpoint… - DELETEDeletemfaphonenumber
/v1/b2b/organizations/:organization_id/members/mfa_phone_numbers/:member_idDelete a Member's MFA phone number. To change a Member's phone number, you must first call this endpoint to delete the existing phone number. Existing Member… - DELETEDeletetotp
/v1/b2b/organizations/:organization_id/members/:member_id/totpDelete a Member's MFA TOTP registration. To mint a new registration for a Member, you must first call this endpoint to delete the existing registration.… - POSTSearch
/v1/b2b/organizations/members/searchWarning: This endpoint is not recommended for use in login flows. Scaling issues may occur, as search performance may vary from ~150 milliseconds to 9 seconds… - DELETEDeletepassword
/v1/b2b/organizations/:organization_id/members/passwords/:member_password_idDelete a Member's password. This endpoint only works for Organization-scoped passwords. For cross-org password Projects, use Require Password Reset By Email… - GETDangerouslyget
/v1/b2b/organizations/members/dangerously_get/:member_id?include_deleted=trueGet a Member by member_id. This endpoint does not require an organization_id, enabling you to get members across organizations. This is a dangerous operation.… - GETOidcproviders
/v1/b2b/organizations/:organization_id/members/:member_id/oidc_providers?include_refresh_token=trueRetrieve the saved OIDC access tokens and ID tokens for a member. After a successful OIDC login, Stytch will save the issued access token and ID token from… - POSTUnlinkretiredemail
/v1/b2b/organizations/:organization_id/members/:member_id/unlink_retired_emailUnlinks a retired email address from a Member specified by their organization_id and member_id. The email address to be retired can be identified in the… - POSTStartemailupdate
/v1/b2b/organizations/:organization_id/members/:member_id/start_email_updateStarts a self-serve email update for a Member specified by their organization_id and member_id. To perform a self-serve update, members must be active and… - GETGetconnectedapps
/v1/b2b/organizations/:organization_id/members/:member_id/connected_appsMember Get Connected Apps retrieves a list of Connected Apps with which the Member has successfully completed an authorization flow. If the Member revokes a… - DELETEDeleteexternalid
/v1/b2b/organizations/:organization_id/members/:member_id/external_id - POSTCreate
/v1/b2b/organizations/:organization_id/membersCreates a Member. An organization_id and email_address are required. - GETGet
/v1/b2b/organizations/:organization_id/member?member_id=string&email_address=stringGet a Member by member_id or email_address.
Members
- GETGoogle
/v1/b2b/organizations/:organization_id/members/:member_id/oauth_providers/google?include_refresh_token=trueRetrieve the saved Google access token and ID token for a member. After a successful OAuth login, Stytch will save the issued access token and ID token from… - GETMicrosoft
/v1/b2b/organizations/:organization_id/members/:member_id/oauth_providers/microsoft?include_refresh_token=trueRetrieve the saved Microsoft access token and ID token for a member. After a successful OAuth login, Stytch will save the issued access token and ID token… - GETSlack
/v1/b2b/organizations/:organization_id/members/:member_id/oauth_providers/slackRetrieve the saved Slack access token and ID token for a member. After a successful OAuth login, Stytch will save the issued access token and ID token from… - GETHubspot
/v1/b2b/organizations/:organization_id/members/:member_id/oauth_providers/hubspot?include_refresh_token=trueRetrieve the saved Hubspot access token and ID token for a member. After a successful OAuth login, Stytch will save the issued access token and ID token from… - GETGithub
/v1/b2b/organizations/:organization_id/members/:member_id/oauth_providers/github?include_refresh_token=trueRetrieve the saved GitHub access token for a Member. After a successful OAuth login, Stytch will save the issued access token from the identity provider.… - POSTRevoke
/v1/b2b/organizations/:organization_id/members/:member_id/connected_apps/:connected_app_id/revokeRevoke Connected App revokes a Connected App's access to a Member and revokes all active tokens that have been created on the Member's behalf. New tokens…
B2B Idp
- POSTAuthorizestart
/v1/b2b/idp/oauth/authorize/startInitiates a request for authorization of a Connected App to access a Member's account. Call this endpoint using the query parameters from an OAuth… - POSTAuthorize
/v1/b2b/idp/oauth/authorizeCompletes a request for authorization of a Connected App to access a Member's account. Call this endpoint using the query parameters from an OAuth…
User
- POSTCreate
/v1/usersAdd a User to Stytch. A user_id is returned in the response that can then be used to perform other operations within Stytch. An email or a phone_number is… - GETGet
/v1/users/:user_idGet information about a specific User. - PUTUpdate
/v1/users/:user_idUpdate a User's attributes. Note: In order to add a new email address or phone number to an existing User object, pass the new email address or phone number… - DELETEDelete
/v1/users/:user_idDelete a User from Stytch. - POSTSearch
/v1/users/searchWarning: This endpoint is not recommended for use in login flows. Scaling issues may occur, as search performance may vary from ~150 milliseconds to 9 seconds… - PUTExchangeprimaryfactor
/v1/users/:user_id/exchange_primary_factorExchange a user's email address or phone number for another. Must pass either an email_address or a phone_number. This endpoint only works if the user has… - DELETEDeleteemail
/v1/users/emails/:email_idDelete an email from a User. - DELETEDeletephonenumber
/v1/users/phone_numbers/:phone_idDelete a phone number from a User. - DELETEDeletewebauthnregistration
/v1/users/webauthn_registrations/:webauthn_registration_idDelete a WebAuthn registration from a User. - DELETEDeletebiometricregistration
/v1/users/biometric_registrations/:biometric_registration_idDelete a biometric registration from a User. - DELETEDeletetotp
/v1/users/totps/:totp_idDelete a TOTP from a User. - DELETEDeletecryptowallet
/v1/users/crypto_wallets/:crypto_wallet_idDelete a crypto wallet from a User. - DELETEDeletepassword
/v1/users/passwords/:password_idDelete a password from a User. - DELETEDeleteoauthregistration
/v1/users/oauth/:oauth_user_registration_idDelete an OAuth registration from a User. - DELETEDeleteexternalid
/v1/users/:user_id/external_id - GETConnectedapps
/v1/users/:user_id/connected_appsUser Get Connected Apps retrieves a list of Connected Apps with which the User has successfully completed an authorization flow. If the User revokes a… - POSTRevoke
/v1/users/:user_id/connected_apps/:connected_app_id/revokeRevoke Connected App revokes a Connected App's access to a User and revokes all active tokens that have been created on the User's behalf. New tokens cannot…
Session
- GETGet
/v1/sessions?user_id=stringList all active Sessions for a given user_id. All timestamps are formatted according to the RFC 3339 standard and are expressed in UTC, e.g.… - POSTAuthenticate
/v1/sessions/authenticateAuthenticate a session token or session JWT and retrieve associated session data. If session_duration_minutes is included, update the lifetime of the session… - POSTRevoke
/v1/sessions/revokeRevoke a Session, immediately invalidating all of its session tokens. You can revoke a session in three ways: using its ID, or using one of its session… - POSTMigrate
/v1/sessions/migrateMigrate a session from an external OIDC compliant endpoint. Stytch will call the external UserInfo endpoint defined in your Stytch Project settings in the… - POSTExchangeaccesstoken
/v1/sessions/exchange_access_tokenUse this endpoint to exchange a Connected Apps Access Token back into a Stytch Session for the underlying User. This session can be used with the Stytch SDKs… - GETGetjwks
/v1/sessions/jwks/:project_idGet the JSON Web Key Set (JWKS) for a project. Within the JWKS, the JSON Web Keys are rotated every ~6 months. Upon rotation, new JWTs will be signed using… - POSTAttest
/v1/sessions/attestExchange an auth token issued by a trusted identity provider for a Stytch session. You must first register a Trusted Auth Token profile in the Stytch… - GETGet
/v1/b2b/sessions?organization_id=string&member_id=stringRetrieves all active Sessions for a Member. - POSTAuthenticate
/v1/b2b/sessions/authenticateAuthenticates a Session and updates its lifetime by the specified session_duration_minutes. If the session_duration_minutes is not specified, a Session will… - POSTRevoke
/v1/b2b/sessions/revokeRevoke a Session and immediately invalidate all its tokens. To revoke a specific Session, pass either the member_session_id, session_token, or session_jwt. To… - POSTExchange
/v1/b2b/sessions/exchangeUse this endpoint to exchange a Member's existing session for another session in a different Organization. This can be used to accept an invite, but not to… - POSTExchangeaccesstoken
/v1/b2b/sessions/exchange_access_tokenUse this endpoint to exchange a Connected Apps Access Token back into a Member Session for the underlying Member. This session can be used with the Stytch… - POSTAttest
/v1/b2b/sessions/attestExchange an auth token issued by a trusted identity provider for a Stytch session. You must first register a Trusted Auth Token profile in the Stytch… - POSTMigrate
/v1/b2b/sessions/migrateMigrate a session from an external OIDC compliant endpoint. Stytch will call the external UserInfo endpoint defined in your Stytch Project settings in the… - GETGetjwks
/v1/b2b/sessions/jwks/:project_idGet the JSON Web Key Set (JWKS) for a project. Within the JWKS, the JSON Web Keys are rotated every ~6 months. Upon rotation, new JWTs will be signed using…
B2B Impersonation
- POSTAuthenticate
/v1/b2b/impersonation/authenticateAuthenticate an impersonation token to impersonate a Member. This endpoint requires an impersonation token that is not expired or previously used. A Stytch…
B2B Rbac
- GETPolicy
/v1/b2b/rbac/policyGet the active RBAC Policy for your current Stytch Project. An RBAC Policy is the canonical document that stores all defined Resources and Roles within your… - GETGetorgpolicy
/v1/b2b/rbac/organizations/:organization_idThe organization RBAC policy feature is currently in private beta and must be enabled for your Workspace. Please contact Stytch support at support@stytch.com… - PUTSetorgpolicy
/v1/b2b/rbac/organizations/:organization_idThe organization RBAC policy feature is currently in private beta and must be enabled for your Workspace. Please contact Stytch support at support@stytch.com…
B2B Recovery Codes
- POSTRecover
/v1/b2b/recovery_codes/recoverAllows a Member to complete an MFA flow by consuming a recovery code. This consumes the recovery code and returns a session token that can be used to… - GETGet
/v1/b2b/recovery_codes/:organization_id/:member_idReturns a Member's full set of active recovery codes. - POSTRotate
/v1/b2b/recovery_codes/rotateRotate a Member's recovery codes. This invalidates all existing recovery codes and generates a new set of recovery codes.
B2B Totp
- POSTCreate
/v1/b2b/totpCreate a new TOTP instance for a Member. The Member can use the authenticator application of their choice to scan the QR code or enter the secret. If the… - POSTAuthenticate
/v1/b2b/totp/authenticateAuthenticate a Member provided TOTP. - POSTMigrate
/v1/b2b/totp/migrateMigrate an existing TOTP instance for a Member. Recovery codes are not required and will be minted for the Member if not provided.
Consumer Rbac
- GETPolicy
/v1/rbac/policyGet the active RBAC Policy for your current Stytch Project. An RBAC Policy is the canonical document that stores all defined Resources and Roles within your…
Crypto Wallet
- POSTAuthenticatestart
/v1/crypto_wallets/authenticate/startInitiate the authentication of a crypto wallet. After calling this endpoint, the user will need to sign a message containing the returned challenge field. For… - POSTAuthenticate
/v1/crypto_wallets/authenticateComplete the authentication of a crypto wallet by passing the signature.
Debug
- GETWhoami
/v1/debug/whoami
Discovery
- POSTExchange
/v1/b2b/discovery/intermediate_sessions/exchangeExchange an Intermediate Session for a fully realized Member Session for the Organization that the user wishes to log into. This endpoint can be used to… - POSTCreate
/v1/b2b/discovery/organizations/createThis endpoint allows you to exchange the intermediate_session_token returned when the user successfully completes a Discovery authentication flow to create a… - POSTList
/v1/b2b/discovery/organizationsList all possible organization relationships connected to a Member Session or Intermediate Session. When a Member Session is passed in, relationships with a… - POSTResetstart
/v1/b2b/passwords/discovery/email/reset/startInitiates a password reset for the email address provided, when cross-org passwords are enabled. This will trigger an email to be sent to the address,… - POSTReset
/v1/b2b/passwords/discovery/email/resetReset the password associated with an email and start an intermediate session. This endpoint checks that the password reset token is valid, hasn’t expired, or…
Fraud
- POSTLookup
https://telemetry.stytch.com/v1/fingerprint/lookupLookup the associated fingerprint for the telemetry_id returned from the GetTelemetryID() function. Learn more about the different fingerprint types and… - POSTSet
https://telemetry.stytch.com/v1/rules/setSet a rule for a particular visitor_id, browser_id, visitor_fingerprint, browser_fingerprint, hardware_fingerprint, network_fingerprint, cidr_block, asn, or… - POSTList
https://telemetry.stytch.com/v1/rules/listGet all rules that have been set for your project. - POSTOverride
https://telemetry.stytch.com/v1/verdict_reasons/overrideUse this endpoint to override the action returned for a specific verdict reason during a fingerprint lookup. For example, Stytch Device Fingerprinting returns… - POSTList
https://telemetry.stytch.com/v1/verdict_reasons/listGet the list of verdict reasons returned by the Stytch Device Fingerprinting product along with their default actions and any overrides you may have defined.… - POSTRisk
https://telemetry.stytch.com/v1/email/riskGet risk information for a specific email address. The response will contain a recommended action (ALLOW, BLOCK, or CHALLENGE) and a more granular risk_score.…
Idp
- POSTAuthorizestart
/v1/idp/oauth/authorize/startInitiates a request for authorization of a Connected App to access a User's account. Call this endpoint using the query parameters from an OAuth Authorization… - POSTAuthorize
/v1/idp/oauth/authorizeCompletes a request for authorization of a Connected App to access a User's account. Call this endpoint using the query parameters from an OAuth Authorization…
Impersonation
- POSTAuthenticate
/v1/impersonation/authenticateAuthenticate an impersonation token to impersonate a User. This endpoint requires an impersonation token that is not expired or previously used. A Stytch…
M2M
- GETGet
/v1/m2m/clients/:client_idGets information about an existing M2M Client. - PUTUpdate
/v1/m2m/clients/:client_idUpdates an existing M2M Client. You can use this endpoint to activate or deactivate an M2M Client by changing its status. A deactivated M2M Client will not be… - DELETEDelete
/v1/m2m/clients/:client_idDeletes the M2M Client. Important: Deleting an M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from receiving new ones.… - POSTSearch
/v1/m2m/clients/searchSearch for M2M Clients within your Stytch Project. Submit an empty query in the request to return all M2M Clients. The following search filters are supported… - POSTCreate
/v1/m2m/clientsCreates a new M2M Client. On initial client creation, you may pass in a custom client_id or client_secret to import an existing M2M client. If you do not pass…
Magic
- POSTAuthenticate
/v1/magic_links/authenticateAuthenticate a User given a Magic Link. This endpoint verifies that the Magic Link token is valid, hasn't expired or been previously used, and any optional… - POSTCreate
/v1/magic_linksCreate an Embeddable Magic Link token for a User. Important usage notes Carefully review the following notes before using Embeddable Magic Links: * Embeddable…
Magic Links
- POSTSend
/v1/magic_links/email/sendSend a magic link to an existing Stytch user using their email address. If you'd like to create a user and send them a magic link by email with one request,… - POSTLoginorcreate
/v1/magic_links/email/login_or_createSend either a login or signup Magic Link to the User based on if the email is associated with a User already. A new or pending User will receive a signup… - POSTInvite
/v1/magic_links/email/inviteCreate a User and send an invite Magic Link to the provided email. The User will be created with a pending status until they click the Magic Link in the… - POSTRevokeinvite
/v1/magic_links/email/revoke_inviteRevoke a pending invite based on the email provided.
B2B Magic
- POSTAuthenticate
/v1/b2b/magic_links/authenticateAuthenticate a Member with a Magic Link. This endpoint requires a Magic Link token that is not expired or previously used. If the Member's status is pending…
B2B Magic Links
- POSTLoginorsignup
/v1/b2b/magic_links/email/login_or_signupSend either a login or signup magic link to a Member. A new, pending, or invited Member will receive a signup Email Magic Link. Members will have a pending… - POSTInvite
/v1/b2b/magic_links/email/inviteSend an invite email to a new Member to join an Organization. The Member will be created with an invited status until they successfully authenticate. Sending… - POSTAuthenticate
/v1/b2b/magic_links/discovery/authenticateAuthenticates the Discovery Magic Link token and exchanges it for an Intermediate Session Token. Intermediate Session Tokens can be used for various Discovery…
- POSTSend
/v1/b2b/magic_links/email/discovery/sendSend a discovery magic link to an email address. The magic link is valid for 60 minutes. - POSTSend
/v1/b2b/otps/email/discovery/sendSend a discovery OTP to an email address. The OTP is valid for 10 minutes. Only the most recently sent OTP is valid: when an OTP is sent, all OTPs previously… - POSTAuthenticate
/v1/b2b/otps/email/discovery/authenticateAuthenticates the OTP and returns an intermediate session token. Intermediate session tokens can be used for various Discovery login flows and are valid for…
B2B Oauth
- POSTAuthenticate
/v1/b2b/oauth/authenticateAuthenticate a Member given a token. This endpoint verifies that the member completed the OAuth flow by verifying that the token is valid and hasn't expired.… - POSTAuthenticate
/v1/b2b/oauth/discovery/authenticateAuthenticates the Discovery OAuth token and exchanges it for an Intermediate Session Token. Intermediate Session Tokens can be used for various Discovery…
B2B Otp
- POSTSend
/v1/b2b/otps/sms/sendSend a One-Time Passcode (OTP) to a Member's phone number. If the Member already has a phone number, the mfa_phone_number field is not needed; the endpoint… - POSTAuthenticate
/v1/b2b/otps/sms/authenticateSMS OTPs may not be used as a primary authentication mechanism. They can be used to complete an MFA requirement, or they can be used as a step-up factor to be… - POSTLoginorsignup
/v1/b2b/otps/email/login_or_signupSend either a login or signup email OTP to a Member. A new, pending, or invited Member will receive a signup email OTP. Non-active members will have a pending… - POSTAuthenticate
/v1/b2b/otps/email/authenticateAuthenticate a Member with a one-time passcode (OTP). This endpoint requires an OTP that is not expired or previously used. OTPs have a default expiry of 10…
Password
- POSTCreate
/v1/passwordsCreate a new user with a password. If session_duration_minutes is specified, a new session will be started as well. If a user with this email already exists… - POSTAuthenticate
/v1/passwords/authenticateAuthenticate a user with their email address and password. This endpoint verifies that the user has a password currently set, and that the entered password is… - POSTStrengthcheck
/v1/passwords/strength_checkThis API allows you to check whether or not the user’s provided password is valid, and to provide feedback to the user on how to increase the strength of… - POSTMigrate
/v1/passwords/migrateAdds an existing password to a User's email that doesn't have a password yet. We support migrating users from passwords stored with bcrypt, scrypt, argon2,… - POSTStrengthcheck
/v1/b2b/passwords/strength_checkThis API allows you to check whether the user’s provided password is valid, and to provide feedback to the user on how to increase the strength of their… - POSTMigrate
/v1/b2b/passwords/migrateWarning: This endpoint marks the Member's email address as verified. Do not use this endpoint unless the user has already verified their email address in your… - POSTAuthenticate
/v1/b2b/passwords/authenticateAuthenticate a member with their email address and password. This endpoint verifies that the member has a password currently set, and that the entered…
Passwords
- POSTResetstart
/v1/passwords/email/reset/startInitiates a password reset for the email address provided. This will trigger an email to be sent to the address, containing a magic link that will allow them… - POSTReset
/v1/passwords/email/resetReset the user's password and authenticate them. This endpoint checks that the magic link token is valid, hasn't expired, or already been used – and can… - POSTReset
/v1/passwords/existing_password/resetReset the User's password using their existing password. Note that a successful password reset via an existing password will revoke all active sessions for… - POSTReset
/v1/passwords/session/resetReset the user’s password using their existing session. The endpoint will error if the session does not have a password, email magic link, or email OTP…
B2B Passwords
- POSTResetstart
/v1/b2b/passwords/email/reset/startInitiates a password reset for the email address provided. This will trigger an email to be sent to the address, containing a magic link that will allow them… - POSTReset
/v1/b2b/passwords/email/resetReset the Member's password and authenticate them. This endpoint checks that the password reset token is valid, hasn’t expired, or already been used. The… - POSTRequirereset
/v1/b2b/passwords/email/require_resetRequire a password be reset by the associated email address. This endpoint is only functional for cross-org password use cases. If there are is only one… - POSTReset
/v1/b2b/passwords/session/resetReset the Member's password using their existing session. The endpoint will error if the session does not contain an authentication factor that has been… - POSTReset
/v1/b2b/passwords/existing_password/resetReset the member's password using their existing password. This endpoint adapts to your Project's password strength configuration. If you're using zxcvbn, the… - POSTAuthenticate
/v1/b2b/passwords/discovery/authenticateAuthenticate an email/password combination in the discovery flow. This authenticate flow is only valid for cross-org passwords use cases, and is not tied to a…
Oauth
- POSTAttach
/v1/oauth/attachGenerate an OAuth Attach Token to pre-associate an OAuth flow with an existing Stytch User. Pass the returned oauth_attach_token to the same provider's OAuth… - POSTAuthenticate
/v1/oauth/authenticateAuthenticate a User given a token. This endpoint verifies that the user completed the OAuth flow by verifying that the token is valid and hasn't expired. To…
Otp
- POSTAuthenticate
/v1/otps/authenticateAuthenticate a User given a method_id (the associated email_id or phone_id) and a code. This endpoint verifies that the code is valid, hasn't expired or been… - POSTSend
/v1/otps/sms/sendSend a one-time passcode (OTP) to a user's phone number. If you'd like to create a user and send them a passcode with one request, use our log in or create… - POSTLoginorcreate
/v1/otps/sms/login_or_createSend a One-Time Passcode (OTP) to a User using their phone number. If the phone number is not associated with a user already, a user will be created. Cost to… - POSTSend
/v1/otps/whatsapp/sendSend a One-Time Passcode (OTP) to a User's WhatsApp. If you'd like to create a user and send them a passcode with one request, use our log in or create… - POSTLoginorcreate
/v1/otps/whatsapp/login_or_createSend a one-time passcode (OTP) to a User's WhatsApp using their phone number. If the phone number is not associated with a User already, a User will be… - POSTSend
/v1/otps/email/sendSend a One-Time Passcode (OTP) to a User using their email. If you'd like to create a user and send them a passcode with one request, use our log in or create… - POSTLoginorcreate
/v1/otps/email/login_or_createSend a one-time passcode (OTP) to a User using their email. If the email is not associated with a User already, a User will be created. Next steps Collect the…
Project
- GETMetrics
/v1/projects/metrics
Sso
- GETGetconnections
/v1/b2b/sso/:organization_idGet all SSO Connections owned by the organization. - DELETEDeleteconnection
/v1/b2b/sso/:organization_id/connections/:connection_idDelete an existing SSO connection. - POSTAuthenticate
/v1/b2b/sso/authenticateAuthenticate a user given a token. This endpoint verifies that the user completed the SSO Authentication flow by verifying that the token is valid and hasn't… - POSTCreateconnection
/v1/b2b/sso/oidc/:organization_idCreate a new OIDC Connection. - PUTUpdateconnection
/v1/b2b/sso/oidc/:organization_id/connections/:connection_idUpdates an existing OIDC connection. When the value of issuer changes, Stytch will attempt to retrieve the OpenID Provider Metadata document found at… - POSTCreateconnection
/v1/b2b/sso/saml/:organization_idCreate a new SAML Connection. - PUTUpdateconnection
/v1/b2b/sso/saml/:organization_id/connections/:connection_idUpdates an existing SAML connection. Note that a newly created connection will not become active until all of the following are provided: * idp_sso_url *… - PUTUpdatebyurl
/v1/b2b/sso/saml/:organization_id/connections/:connection_id/urlUsed to update an existing SAML connection using an IDP metadata URL. A newly created connection will not become active until all the following are provided:… - DELETEDeleteverificationcertificate
/v1/b2b/sso/saml/:organization_id/connections/:connection_id/verification_certificates/:certificate_idDelete a SAML verification certificate. You may need to do this when rotating certificates from your IdP, since Stytch allows a maximum of 5 certificates per… - DELETEDeleteencryptionprivatekey
/v1/b2b/sso/saml/:organization_id/connections/:connection_id/encryption_private_keys/:private_key_idDelete a SAML encryption private key. - POSTCreateconnection
/v1/b2b/sso/external/:organization_idCreate a new External SSO Connection. - PUTUpdateconnection
/v1/b2b/sso/external/:organization_id/connections/:connection_idUpdates an existing External SSO connection.
Totp
- POSTCreate
/v1/totpsCreate a new TOTP instance for a user. The user can use the authenticator application of their choice to scan the QR code or enter the secret. - POSTAuthenticate
/v1/totps/authenticateAuthenticate a TOTP code entered by a user. - POSTRecoverycodes
/v1/totps/recovery_codesRetrieve the recovery codes for a TOTP instance tied to a User. - POSTRecover
/v1/totps/recoverAuthenticate a recovery code for a TOTP instance.
Webauthn
- POSTRegisterstart
/v1/webauthn/register/startInitiate the process of creating a new Passkey or WebAuthn registration. To optimize for Passkeys, set the return_passkey_credential_options field to true.… - POSTRegister
/v1/webauthn/registerComplete the creation of a WebAuthn registration by passing the response from the navigator.credentials.create() request to this endpoint as the… - POSTAuthenticatestart
/v1/webauthn/authenticate/startInitiate the authentication of a Passkey or WebAuthn registration. To optimize for Passkeys, set the return_passkey_credential_options field to true. After… - POSTAuthenticate
/v1/webauthn/authenticateComplete the authentication of a Passkey or WebAuthn registration by passing the response from the navigator.credentials.get() request to the authenticate… - PUTUpdate
/v1/webauthn/:webauthn_registration_idUpdates a Passkey or WebAuthn registration. - GETListcredentials
/v1/webauthn/credentials/:user_id/:domainList the public key credentials of the WebAuthn Registrations or Passkeys registered to a specific User.
API details
- Base URL
https://api.stytch.comhttps://test.stytch.com- Authentication
- HTTP Basic authentication (username and password)
- Operations
- 184 operations on 171 pathsPOST 116GET 31DELETE 23PUT 14
- Main resources
- User 17Organizations 15Session 15Sso 12Organization 9B2B Scim 8Otp 7Password 7B2B Passwords 6Clients 6
- Response formats
application/json- Description format
- OpenAPI 3.0.3, API version
2.1.1 - Links
- OpenAPI document · Support
- Listed from
- Stytch's published OpenAPI description (stytchauth/stytch-openapi) (MIT)
How to test the Stytch API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Stytch API collection, without the publisher's secrets.
- Add your credentialsThis API uses HTTP Basic authentication (username and password). Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Get” (GET /v1/connected_apps/clients/:client_id), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Stytch API?
The Stytch API provides endpoints for authentication and user management. It is listed under Identity & security and has 184 endpoints.
Who publishes the Stytch API?
It is listed from Stytch's public API description (an OpenAPI document), not published by Stytch on Swastik Codes. Anyone who controls stytch.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Stytch API?
Its description lists 2 base URLs: https://api.stytch.com, https://test.stytch.com. The first is the usual one; the others are typically sandbox or regional servers.
How do I authenticate with the Stytch API?
With HTTP Basic authentication (username and password).
How many endpoints does the Stytch API have?
184 operations on 171 paths (116 POST, 31 GET, 23 DELETE, 14 PUT). The largest groups are User, Organizations, Session, Sso.
Is forking the Stytch API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.