otps.sms.send wraps the Send SMS OTP endpoint. Call this method to send an SMS passcode to an existing .
If a Member has a phone number and is enrolled in MFA, then after a successful primary authentication event (e.g. email magic link authenticate or SSO authenticate is complete), an SMS OTP will automatically be sent to their phone number. In that case, this endpoint should only be used for subsequent authentication events, such as prompting a Member for an OTP again after a period of inactivity.
Cost to send SMS OTP
Before configuring SMS or WhatsApp OTPs, review how Stytch bills the costs of international OTPs and understand how to protect your app against toll fraud.Parameters
Globally unique UUID that identifies a specific Organization. You may also use the
organization_slug or organization_external_id here as a convenience.Globally unique UUID that identifies a specific Member. You may use an
external_id here if one is set for the member.The phone number to send the OTP to. If the Member already has a phone number, this argument is not needed.
Used to determine which language to use when sending the user this delivery method. Parameter is an IETF BCP 47 language tag, e.g. “en”.Supported languages are English (“en”), Spanish (“es”), French (“fr”) and Brazilian Portuguese (“pt-br”); if no value is provided, the copy defaults to English.
Response
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we
may ask for this value to help identify a specific API call when helping you debug an issue.
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values
equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.