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
mobilePhonenumber 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
referenceIdthat 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
POST
/
10dlc
/
brand
/
{brandId}
/
smsOtp
JavaScript
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);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)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Messaging10dlc.Brand.TriggerSMSOtp(
context.TODO(),
"4b20019b-043a-78f8-0657-b3be3f4b4002",
telnyx.Messaging10dlcBrandTriggerSMSOtpParams{
PinSMS: "Your PIN is @OTP_PIN@",
SuccessSMS: "Verification successful!",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.BrandID)
}
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);
}
}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)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->messaging10dlc->brand->triggerSMSOtp(
'4b20019b-043a-78f8-0657-b3be3f4b4002',
pinSMS: 'Your PIN is @OTP_PIN@',
successSMS: 'Verification successful!',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}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!'curl --request POST \
--url https://api.telnyx.com/v2/10dlc/brand/{brandId}/smsOtp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pinSms": "Your PIN is @OTP_PIN@",
"successSms": "Verification successful!"
}
'{
"brandId": "4b20019b-043a-78f8-0657-b3be3f4b4002",
"referenceId": "OTP4B2001"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The Brand ID for which to trigger the OTP
Example:
"4b20019b-043a-78f8-0657-b3be3f4b4002"
Body
application/json
Request body for triggering a Brand SMS OTP
Was this page helpful?
JavaScript
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);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)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Messaging10dlc.Brand.TriggerSMSOtp(
context.TODO(),
"4b20019b-043a-78f8-0657-b3be3f4b4002",
telnyx.Messaging10dlcBrandTriggerSMSOtpParams{
PinSMS: "Your PIN is @OTP_PIN@",
SuccessSMS: "Verification successful!",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.BrandID)
}
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);
}
}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)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->messaging10dlc->brand->triggerSMSOtp(
'4b20019b-043a-78f8-0657-b3be3f4b4002',
pinSMS: 'Your PIN is @OTP_PIN@',
successSMS: 'Verification successful!',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}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!'curl --request POST \
--url https://api.telnyx.com/v2/10dlc/brand/{brandId}/smsOtp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pinSms": "Your PIN is @OTP_PIN@",
"successSms": "Verification successful!"
}
'{
"brandId": "4b20019b-043a-78f8-0657-b3be3f4b4002",
"referenceId": "OTP4B2001"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
}
}
]
}