> ## Documentation Index
> Fetch the complete documentation index at: https://stytch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SMS Send

> Send SMS one-time passcode using the Stytch Next.js SDK

export const organization = "Represents an instance or tenant in your application, typically mapping to each of your top-level customers.";

export const member = "Represents an individual end user's account within a given Organization, uniquely identified within that Organization by their email address.";

`otps.sms.send` wraps the [Send SMS OTP](/api-reference/b2b/api/mfa/otp/send-sms-otp) endpoint. Call this method to send an SMS passcode to an existing <Tooltip tip={member}>Member</Tooltip>.

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](../../email-magic-links/authenticate) or [SSO authenticate](../../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](https://stytch.com/pricing) and understand how to protect your app against [toll fraud](/resources/policies/messaging/toll-fraud).

## Parameters

<ParamField path="organization_id" type="string" required>
  Globally unique UUID that identifies a specific Organization.  You may also use the `organization_slug` or `organization_external_id` here as a convenience.
</ParamField>

<ParamField path="member_id" type="string" required>
  Globally unique UUID that identifies a specific Member. You may use an `external_id` here if one is set for the member.
</ParamField>

<ParamField path="mfa_phone_number" type="string">
  The phone number to send the OTP to. If the Member already has a phone number, this argument is not needed.
</ParamField>

<ParamField path="locale" type="string">
  Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), 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.
</ParamField>

## Response

<ResponseField name="request_id" type="string">
  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.
</ResponseField>

<ResponseField name="status_code" type="number">
  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.
</ResponseField>

<Panel>
  <RequestExample>
    ```jsx theme={null}
    import { useStytchB2BClient } from '@stytch/nextjs/b2b';

    export const SendSMSOTP = () => {
      const stytch = useStytchB2BClient();

      const sendOTP = async () => {
        const response = await stytch.mfa.otps.sms.send({
          organization_id: 'organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931',
          member_id: 'member-test-32fc5024-9c09-4da3-bd2e-c9698807585d',
          mfa_phone_number: '+15555555555',
        });
        console.log('SMS OTP sent:', response);
      };

      return <button onClick={sendOTP}>Send SMS OTP</button>;
    };
    ```
  </RequestExample>
</Panel>
