Send SMS Using the SDK

sendSms(payload: { phone_number: string; caller_id: string; sms_body: string; pool_id: string; opt_in: boolean; })


Returns: Promise<object> — API response with a status (status value should be "queued").

Example:


Parameters:

Name
Type
Required
Description

team_id

string

yes

Located on the API Setting tab.

Example: <Your Team ID>

secret

string

yes

Located on the API Setting tab.

Example: <Your Team Secret>

caller_id

string

yes

Phone number to forward calls/texts when contact replies. Must be in E.164 format.

Example: +15557778888

phone_number

string

yes

Your contact's phone number in E.164 format.

Example: +15552223333

pool_id

string

yes

ID of the private number pool registered to send SMS messages

sms_body

string

yes

Plain text message. Character limit: 160.

Example: Hello World

opt_in

boolean

yes

Confirmation that you obtained OPT-IN permission.

Example: true

foreign_id

string

optional

Value to identify this drop in your system. Passed through to webhook callback. Max length 256 characters.

Example: <Your system's ID>

callback_url

string

optional

Override default RVM webhook URL.

Example: http://example.com

Last updated

Was this helpful?