Create Message

Creates and sends or schedules an email or SMS message. For email, provide content, template, subject, sender, and segments. For SMS, provide content, numbers, and messaging service. Use splits for A/B testing.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Body Params

integer
required

Numeric ID of the message type to send. Look up the ID via GET /messages/types — the name field there will be one of: 'email-free-style', 'email-article', 'email-renewal', 'email-promo', or 'sms-message'.

boolean
required

Whether the message is a test send. When true, emails (for email) or numbers (for SMS) must be provided instead of included/excluded segments.

string

A future date for a scheduled message. Eg. 1970-01-01T00:00:00-00:00

string

The type of the message test or live

string

The content of the message. Required when splits is not provided. When splits are used, provide content inside each split entry instead.

integer

The id of the template. Email messages only; required when splits is not provided.

numbers
array of strings

Array of recipient phone numbers in E.164 format (e.g. '+15555555555'). Required when is_test is true and the message type is SMS.

numbers
integer
required

Publication ID the message belongs to

integer

The associated Resource ID if the message type is email-article

boolean

Whether to publish the associated Resource when the message is sent.

integer

The id of the binding on which to send the message.

included_segment_ids
array of integers

The segment IDs to send the message to. Required when is_test is false (live send).

included_segment_ids
excluded_segment_ids
array of integers

The segment IDs to exclude from the live send.

excluded_segment_ids
emails
array of strings

Array of email addresses to send a test to. Required when is_test is true and the message type is email.

emails
splits
array of objects

Optional A/B test splits. When provided, each split entry must include its own content/subject/sender/reply_id/resource_id and a numeric amount (or a shared sample_size at the top level).

splits
integer

Total sample size across splits. Required when splits are provided without per-split amount values.

string

The metric used to pick the winning split (e.g. 'opens', 'clicks', 'revenue'). Required when splits are provided.

integer

Minimum lead percentage required to declare a winner. Required when splits are provided.

integer

Seconds to wait after the test sample completes before sending the winner to the remaining audience. Required when splits are provided and win_after_time is not set.

date-time

Absolute ISO 8601 timestamp to declare a winner. Alternative to win_after.

string

The subject of the message being sent.

integer

The id of the sender the message should come from.

integer

The id of the reply-to sender for the message.

string

The preview line that will be displayed in a message.

tag_ids
array of integers

Array of tag ids to associate with Message

tag_ids
Response

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Choose an example:
application/json