Create SMS Campaign

Creates an SMS campaign. Pass a to list without status to send. schedule_at delays that send.
Pass status: "draft" without to to save a draft. Pass status: "scheduled" with schedule_at
and included_audience to send once later. Pass status: "recurring" without to to start a series.

Email campaigns use POST /v1/campaigns/email. WhatsApp campaigns use POST /v1/campaigns/whatsapp.
Fax campaigns use POST /v1/campaigns/fax.

Send. Creates and sends an SMS campaign. Attachments for MMS campaigns are also accepted.
Messages use the channel for from. The message body must be less than 1000 characters.
Attachment-only messages are also accepted.

If there is no contact for the organization corresponding to the parameters in the to list, a new
contact will be created, along with a conversation with the from number channel. If there is an
existing contact but no conversation, a new conversation will be created. All contacts will be tagged
with an upload tag with a timestamp corresponding to the time of creation of the campaign.

The contacts in the to list will be formatted to E.164 and validated. Invalid numbers are removed
and processing continues with the valid ones. If no valid numbers remain, a 422 is returned.

When custom_data is provided, the contacts will be associated with a custom object. The custom
object and its custom properties must exist first. Set resource to contact or campaign_contact.

A successful send returns 202 Accepted while the campaign is processed in the background.

Draft. Pass status: "draft". Do not pass to. from is a phone channel. Optional Whippy
Query filter items go in included_audience and excluded_audience. automation_templates is
optional and capped at 50. A draft never creates contacts and is never sent automatically. A
successful draft returns 201 Created.

Scheduled. Pass status: "scheduled", schedule_at, and included_audience. Do not pass to.
The campaign is sent once at that time. A successful request returns 201 Created.

Recurring. Pass status: "recurring". Do not pass to. Requires included_audience
and recurring_settings (cron_expression, timezone, start_date; optional end_date).
cron_expression is a five-field cron evaluated in timezone (0 9 * * * is 09:00 every day).
The series starts immediately. A successful request returns 201 Created for the series parent.

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

Create Campaign Params

Request schema for creating an SMS campaign at POST /v1/campaigns/sms.

One of body or attachments is required.

Omit status with a to list to create contacts as needed and send. schedule_at delays that
send. Pass status: "draft" without to to save a draft. Pass status: "scheduled" with
schedule_at and included_audience to send once later. Pass status: "recurring" without to
to start a recurring series.

Email, WhatsApp, and fax campaigns use POST /v1/campaigns/email, POST /v1/campaigns/whatsapp,
and POST /v1/campaigns/fax.

attachments
array of strings

List of attachment URLs for the campaign.

attachments
automation_templates
array of uuids
length ≤ 50

List of IDs of automation templates. At most 50.
Templates of type "duplicate" will have their triggers, actions, and keywords duplicated for the campaign.
Templates of type "as-is" would be associated with the campaign and their triggers, actions, and keywords will be reused.

automation_templates
string

Campaign message body. Limited to 1000 characters.

custom_data
object

Optional field used to indicate that the contacts from the campaign should be associated with a custom object. In combination with the custom_data field, there should be a properties field that contains the actual custom data to be associated with the contacts. Ignored for drafts.

exclude
object

Optional settings to exclude contacts from a send. Ignored for drafts.

excluded_audience
array of objects

Whippy Query filter items for the contacts to exclude. Each item is a column comparison or a
logical_group. A logical group sets resource to logical_group and includes and or or
instead of column, comparison, and value. Nested arrays must contain at least one item.
Optional. When omitted on a draft, scheduled, or recurring campaign, the default campaign
exclusions for the channel are applied.

CampaignExcludedAudience
string
required

Phone number of the phone channel the SMS campaign sends from.

included_audience
array of objects

Whippy Query filter items for the contacts to include. Each item is a column comparison or a
logical_group. A logical group sets resource to logical_group and includes and or or
instead of column, comparison, and value. Nested arrays must contain at least one item.
Optional for a draft. Required when status is scheduled or recurring.

CampaignIncludedAudience
recurring_settings
object | null

Schedule for a recurring SMS series.

cron_expression, timezone, and start_date are required when this object is present.
end_date is optional. Required on create when status is recurring. Optional on a draft.

On update the object is merged with the stored schedule. Omit a field to keep its stored
value. Send end_date as null to clear a stored end date.

parent_campaign_id is set by the server on a scheduled occurrence and is null on the
series parent. A value sent by the caller is ignored.

date-time

Scheduling time in ISO 8601 format. Delays a to list send. Required when status is
scheduled. Not accepted on a draft or a recurring series.

string
enum

Pass draft to save a draft. Pass scheduled with schedule_at and included_audience
to send once. Pass recurring to start a series. Omit this field to send a to list.

Allowed:
string
required

Campaign title

to
array of objects
length between 1 and 4000

List of contacts that would receive the campaign. Required when sending. Do not pass with
status: "draft" or status: "recurring".

to

Data for a contact that would receive the campaign.

address
object

Optional Address details of the Contact

birth_date
object

Birthday details of the Contact.

uuid

The ID of the channel from which the contact should receive messages by default.

string
length ≤ 255

Contact email

string

The external ID of a contact. It uniquely identifies a contact and
can be useful for associating whippy contacts with external systems.

string

The language preference of the Contact

string
length ≤ 255

Contact name

boolean

Whether the contact is opted in to email at the organization level

boolean

Whether the contact is opted in to SMS at the organization level

boolean

Whether the contact is opted out of all organization-level channel types

string
required

Contact phone number

properties
object

Contact properties mapped to custom data. These properties are mapped to the custom object in the payload.

The properties keys should correspond to the keys of the custom properties that belong to the custom object.

Responses

Callback
Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json