Campaigns
Campaigns define reusable message templates and parameter strategies for marketing messages. They are associated with channels and can be used to create flows that send messages to multiple contacts.Create Campaign
POST /campaigns
Creates a new campaign with the specified template and parameters.
Request Body
string
required
Channel UID to associate with the campaign
string
required
Campaign name
object
Campaign description
string
required
Campaign status:
ACTIVE, PENDING, DEPRECATED, INACTIVE, or BLOCKEDstring
required
WhatsApp template name (must be approved by Meta)
string
required
Strategy for filling template parameters:
USE_DEFAULT or USE_CONTACT_ASSOCIATIONobject
Template parameter mapping. Keys are parameter names, values can be:
- Single value:
"name" - Fallback chain:
"age, default"(tries age first, then default) - Multiple fallbacks:
"favoriteColor, favoriteSport, default"
Response
Success message
List Campaigns
GET /campaigns
Retrieves a paginated list of campaigns with filtering options.
Query Parameters
number
required
Workspace ID to filter campaigns
number
Channel ID to filter campaigns
string
Filter campaigns by name (partial match)
string
Filter by status:
ACTIVE, PENDING, DEPRECATED, INACTIVE, BLOCKEDstring
Cursor for pagination (from previous response)
number
Maximum number of results (default: 20, max: 100)
Response
Array of campaign objects
Cursor for next page (null if no next page)
Cursor for previous page (null if no previous page)
Total number of campaigns matching the filters
Get Campaign
GET /campaigns/{uid}
Retrieves detailed information about a specific campaign.
Campaign unique identifier (UUID)
Update Campaign
PATCH /campaigns/{uid}
Updates an existing campaign. Only provided fields will be updated. Channel UID cannot be changed.
Campaign unique identifier (UUID)
Request Body
Same fields as Create Campaign (all optional).Delete Campaign
DELETE /campaigns/{uid}
Deletes a campaign. Cannot delete if it has running flows.
Campaign unique identifier (UUID)
Template Parameters
Template parameters can be mapped using fallback chains:nameparameter uses the contact’snamefieldageparameter triesagefield first, falls back to template defaultintereststries multiple fields in order, then defaults
Campaign Status
ACTIVE- Campaign is active and can be used in flowsPENDING- Campaign is pending approval or setupDEPRECATED- Campaign is deprecated (still works but not recommended)INACTIVE- Campaign is inactiveBLOCKED- Campaign is blocked (cannot be used)
