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

# Trigger Brand SMS OTP

> Trigger or re-trigger an SMS OTP (One-Time Password) for Sole Proprietor brand verification.

**Important Notes:**

* Only allowed for Sole Proprietor (`SOLE_PROPRIETOR`) brands
* Triggers generation of a one-time password sent to the `mobilePhone` number in the brand's profile
* Campaigns cannot be created until OTP verification is complete
* US/CA numbers only for real OTPs; mock brands can use non-US/CA numbers for testing
* Returns a `referenceId` that can be used to check OTP status via the GET `/10dlc/brand/smsOtp/{referenceId}` endpoint

**Use Cases:**

* Initial OTP trigger after Sole Proprietor brand creation
* Re-triggering OTP if the user didn't receive or needs a new code



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/messaging-10dlc/brands.yml post /10dlc/brand/{brandId}/smsOtp
openapi: 3.1.0
info:
  title: Telnyx 10DLC Brands API
  version: 2.0.0
  description: API for 10DLC brand management.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /10dlc/brand/{brandId}/smsOtp:
    post:
      tags:
        - Brands
      summary: Trigger Brand SMS OTP
      description: >-
        Trigger or re-trigger an SMS OTP (One-Time Password) for Sole Proprietor
        brand verification.


        **Important Notes:**


        * Only allowed for Sole Proprietor (`SOLE_PROPRIETOR`) brands

        * Triggers generation of a one-time password sent to the `mobilePhone`
        number in the brand's profile

        * Campaigns cannot be created until OTP verification is complete

        * US/CA numbers only for real OTPs; mock brands can use non-US/CA
        numbers for testing

        * Returns a `referenceId` that can be used to check OTP status via the
        GET `/10dlc/brand/smsOtp/{referenceId}` endpoint


        **Use Cases:**


        * Initial OTP trigger after Sole Proprietor brand creation

        * Re-triggering OTP if the user didn't receive or needs a new code
      operationId: TriggerBrandSmsOtp
      parameters:
        - required: true
          schema:
            title: Brandid
            type: string
            example: 4b20019b-043a-78f8-0657-b3be3f4b4002
          name: brandId
          in: path
          description: The Brand ID for which to trigger the OTP
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerBrandSmsOtpRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerBrandSmsOtpResponse'
        '400':
          description: >-
            Bad Request - Brand is not a Sole Proprietor or invalid mobile phone
            number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        4XX:
          $ref: '#/components/responses/10dlc_GenericErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Telnyx from 'telnyx';

            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.messaging10dlc.brand.triggerSMSOtp(
              '4b20019b-043a-78f8-0657-b3be3f4b4002',
              { pinSms: 'Your PIN is @OTP_PIN@', successSms: 'Verification successful!' },
            );

            console.log(response.brandId);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            response = client.messaging_10dlc.brand.trigger_sms_otp(
                brand_id="4b20019b-043a-78f8-0657-b3be3f4b4002",
                pin_sms="Your PIN is @OTP_PIN@",
                success_sms="Verification successful!",
            )
            print(response.brand_id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Messaging10dlc.Brand.TriggerSMSOtp(\n\t\tcontext.TODO(),\n\t\t\"4b20019b-043a-78f8-0657-b3be3f4b4002\",\n\t\ttelnyx.Messaging10dlcBrandTriggerSMSOtpParams{\n\t\t\tPinSMS:     \"Your PIN is @OTP_PIN@\",\n\t\t\tSuccessSMS: \"Verification successful!\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.BrandID)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.messaging10dlc.brand.BrandTriggerSmsOtpParams;

            import
            com.telnyx.sdk.models.messaging10dlc.brand.BrandTriggerSmsOtpResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    BrandTriggerSmsOtpParams params = BrandTriggerSmsOtpParams.builder()
                        .brandId("4b20019b-043a-78f8-0657-b3be3f4b4002")
                        .pinSms("Your PIN is @OTP_PIN@")
                        .successSms("Verification successful!")
                        .build();
                    BrandTriggerSmsOtpResponse response = client.messaging10dlc().brand().triggerSmsOtp(params);
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            response = telnyx.messaging_10dlc.brand.trigger_sms_otp(
              "4b20019b-043a-78f8-0657-b3be3f4b4002",
              pin_sms: "Your PIN is @OTP_PIN@",
              success_sms: "Verification successful!"
            )

            puts(response)
        - lang: CLI
          source: |-
            telnyx messaging-10dlc:brand trigger-sms-otp \
              --api-key 'My API Key' \
              --brand-id 4b20019b-043a-78f8-0657-b3be3f4b4002 \
              --pin-sms 'Your PIN is @OTP_PIN@' \
              --success-sms 'Verification successful!'
components:
  schemas:
    TriggerBrandSmsOtpRequest:
      title: TriggerBrandSmsOtpRequest
      required:
        - pinSms
        - successSms
      type: object
      properties:
        pinSms:
          title: Pinsms
          type: string
          description: >-
            SMS message template to send the OTP. Must include `@OTP_PIN@`
            placeholder which will be replaced with the actual PIN
          example: Your PIN is @OTP_PIN@
        successSms:
          title: Successsms
          type: string
          description: SMS message to send upon successful OTP verification
          example: Verification successful!
      description: Request body for triggering a Brand SMS OTP
    TriggerBrandSmsOtpResponse:
      title: TriggerBrandSmsOtpResponse
      required:
        - brandId
        - referenceId
      type: object
      properties:
        brandId:
          title: Brandid
          type: string
          description: The Brand ID for which the OTP was triggered
          example: 4b20019b-043a-78f8-0657-b3be3f4b4002
        referenceId:
          title: Referenceid
          type: string
          description: The reference ID that can be used to check OTP status
          example: OTP4B2001
      description: Response after successfully triggering a Brand SMS OTP
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    ValidationError:
      title: ValidationError
      required:
        - loc
        - msg
        - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
    10dlc_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/10dlc_Error'
      type: object
    10dlc_Error:
      required:
        - code
        - title
      type: object
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
  responses:
    10dlc_GenericErrorResponse:
      description: Generic response error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/10dlc_Errors'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````