Skip to main content

Create a campaign

POST 

/api/partner-gateway/v1/campaigns

Creates a new bulk messaging campaign. The typical lifecycle is: (1) Create the campaign with readyToSend=false to save it as a draft. (2) Optionally update the campaign with PUT /campaigns/{id} to adjust its configuration. (3) Call POST /campaigns/{id}/calculateGoal to compute the recipient count and estimated cost. (4) Review the price with GET /campaigns/{id}/price. (5) Set readyToSend=true via PUT /campaigns/{id} when the configuration is final. (6) Confirm and dispatch the campaign with PUT /campaigns/{id}/confirm. The channel is determined by the sendingMode field. Valid values are: SMS (plain text messages), RCS (rich card messages via an RCS agent), WHATSAPP (pre-approved WhatsApp templates), and combined modes like RCS_SMS, WHATSAPP_SMS, WHATSAPP_RCS, WHATSAPP_RCS_SMS which provide automatic fallback across channels. For SMS campaigns, you must provide smsSender (the alphanumeric sender ID or phone number) and smsBody (the message text, which supports {{placeholder}} syntax for personalization using contact fields). For RCS campaigns, you must provide rcsAgentId and rcsTemplateId. For WhatsApp campaigns, you must provide whatsappPhoneNumberId and whatsappTemplateId. Recipients are specified either by contactListIds (an array of contact list IDs, destinationType=1) or by destinations (an array of phone numbers in E.164 format, destinationType=2). You can set a scheduledDate in the future (format: yyyy-MM-dd HH:mm:ss.SSSZ) to schedule the campaign for later delivery instead of immediate dispatch upon confirmation. Returns 400 if required fields are missing or if sendingMode is not a valid value. Returns 401 if the API key is missing or invalid.

Request

Responses

Campaign created successfully