Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

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

Body

application/json

Message payload with send_at set

to
string
required

Receiving address (+E.164 formatted phone number or short code).

Example:

"+E.164"

from
string

Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code).

Required if sending with a phone number, short code, or alphanumeric sender ID.

messaging_profile_id
string

Unique identifier for a messaging profile.

Required if sending via number pool or with an alphanumeric sender ID.

text
string

Message body (i.e., content) as a non-empty string.

Required for SMS

subject
string

Subject of multimedia message

media_urls
string<url>[]

A list of media URLs. The total media size must be less than 1 MB.

Required for MMS

webhook_url
string<url>

The URL where webhooks related to this message will be sent.

webhook_failover_url
string<url>

The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.

use_profile_webhooks
boolean
default:true

If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile.

type
enum<string>

The protocol for sending the message, either SMS or MMS.

Available options:
SMS,
MMS
auto_detect
boolean
default:false

When true, rejects the request with error 40328 if text is longer than 765 characters and can be encoded as GSM-7, or longer than 670 characters otherwise. This is a character limit on text as submitted, before smart encoding is applied, not a count of the parts the message is sent in. Not applied to MMS or to messages sent from an alphanumeric sender ID.

send_at
string<date-time>

ISO 8601 formatted date indicating when to send the message - accurate up till a minute.

Response

Successful response with details about a message.

data
object
Example: