Skip to main content
POST
Create campaign
Creates a one-time campaign that sends up to 5 Meta templates, in order, to the contacts of a segment.

How it sends

  • Audience: the segment’s contacts are captured when the campaign is created. Contacts who join the segment later are not added.
  • Steps: each step waits wait_before (1 day by default) after the previous one. A recipient who replies stops receiving the steps after it.
  • Start: start_at is "now" (the default) or a future date-time. Without batch_size, everyone is released at once; with batch_size and batch_interval_minutes, the audience is released in batches until everyone has been reached.

Template variables

variables sets each template variable by its position: "1" is {{1}}, counted across header, body and buttons, in that order. A value is either fixed text or a contact placeholder resolved for each recipient: Header and body variables you leave out are written by the AI for each recipient, from their contact information and conversation. The response lists them in ai_filled_variables. Button variables (URLs, phone numbers and button text) are required.

Limits

One campaign can be created every 30 minutes per account. A request inside that window answers 429 with retry_after_seconds. Requests rejected with a 4xx before the campaign is created do not start the window. Track the campaign with Get campaign and Get campaign recipients.

Headers

x-api-key
string
required

API key needed to authorize the request

Body

application/json
name
string
required
Required string length: 1 - 255
segment_id
string<uuid>
required

The segment to send to. Its contacts are captured when the campaign is created; contacts who join the segment later are not added.

steps
object[]
required

The messages to send, in order. A recipient who replies stops receiving the steps after it.

Required array length: 1 - 5 elements
sending
object

Response

Campaign created and scheduled.

id
string<uuid>
name
string
segment_id
string<uuid>
audience_size
integer

Contacts captured from the segment

start_at
string<date-time>
batch_size
integer | null
batch_interval_minutes
integer | null
steps
object[]