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.

Path Parameters

account_id
string
required

The account from which the message should be sent.

Example:

"acct_01j9a43avnfqzbjfch6pygv1td"

Body

application/json

Create a message while including parameters for the conversation in which the message should be sent.

conversation
ConversationParams · object
required

Params for selecting or creating a new conversation. Either the id or the Contact must be given.

Example:
attachments
AttachmentParams · object[]
body
string

The message body.

metadata
Metadata · object

Set of key-value pairs that will be stored with the object.

send_at
string<date-time>

An optional datetime for scheduling message up to a couple of months in the future.

settings
MessageSettingsParams · object

Per-message setting overrides.

Example:

Response

Created message

A Message is a communication sent to a Contact.

attachments
Attachment · object[]
blast_id
string | null

The ID of the blast this message belongs to, if any. This can be used to attribute messages back to a specific blast.

body
string | null

The message body.

conversation
Conversation · object

A conversation with a Contact

Example:
id
string

Unique identifier for the object.

metadata
Metadata · object

Set of key-value pairs that will be stored with the object.