Skip to main content
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);
{
  "brandId": "4b20019b-043a-78f8-0657-b3be3f4b4002",
  "referenceId": "OTP4B2001"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

brandId
string
required

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

pinSms
string
required

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
string
required

SMS message to send upon successful OTP verification

Example:

"Verification successful!"

Response

Successful Response

Response after successfully triggering a Brand SMS OTP

brandId
string
required

The Brand ID for which the OTP was triggered

Example:

"4b20019b-043a-78f8-0657-b3be3f4b4002"

referenceId
string
required

The reference ID that can be used to check OTP status

Example:

"OTP4B2001"