Skip to main content
Messages

Send an SMS

POST
/messages
Authorizationstringheaderrequired

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

Body

application/json
attachmentsstring[]

Public https URLs of media to send as MMS.

Maximum array length: 10
bodystringrequired
Required string length: 1 - 1600
customer_idstring
from_numberstring

One of the company's numbers (see GET /configuration/phone-numbers). Defaults to the company's default number.

Required string length: 1 - 40
lead_idstring
tostring

Phone number to text, in E.164 format. Exactly one of to, lead_id, customer_id.

Pattern: ^\+[1-9]\d{6,14}$
Example: +15125550199

Response

application/json

The message was sent

X-RateLimit-Limitintegerheader

The company's daily request limit.

X-RateLimit-Remainingintegerheader

Requests left in the current daily window.

X-RateLimit-Resetstringheader

When the daily window resets (UTC ISO timestamp).

X-RateLimit-Minute-Limitintegerheader

The company's per-minute request limit.

X-RateLimit-Minute-Remainingintegerheader

Requests left in the current minute.

X-RateLimit-Minute-Resetstringheader

When the minute window resets (UTC ISO timestamp).

attachmentsobject[]required
channelenum<string>required
Available options: sms
contactobject | nullrequired

The lead or customer the message is with.

contentstring | nullrequired
created_atstringrequired
directionenum<string>required
Available options: inbound, outbound
errorstring | nullrequired

The last delivery error, if any.

from_numberstring | nullrequired
Example: +15125550101
idstringrequired
readbooleanrequired

Only inbound messages start unread.

statusenum<string>required

Provider delivery status. received is for inbound messages.

Available options: pending, sent, delivered, received, failed
Example: delivered
to_numberstring | nullrequired
Example: +15125550199