Skip to main content

Create an SMS campaign

POST 

/api/partner-gateway/campaigns

Creates a bulk SMS campaign, as a draft or already marked ready to send. Nothing is sent until you confirm it.

  • Channel: set sendingMode to SMS. The campaign needs an approved sender (smsSender) and the text (smsBody).
  • Recipients: contact lists in contactListIds (destinationType 0), phone numbers in destinations (destinationType 1), or both (destinationType 2).
  • Schedule: set scheduledDate to a future time (yyyy-MM-dd HH:mm:ss.SSSZ) to send later. Without it the campaign is sent as soon as it is confirmed.
  • The sender is checked against your account: smsSender must be an approved sender (see GET /sms/senders). Nothing is created when the check fails.
  • Personalisation: smsBody accepts placeholders in single braces named after your contact fields, such as {firstName}.
  • API key: CAMPAIGNS opens every campaign. A key without it manages only the campaigns whose sendingMode uses its channel operations, all of them for a combined mode: SMS campaigns need SMS, RCS_SMS campaigns need RCS and SMS.
From draft to sending, step by step
  1. Create the campaign with readyToSend false to save it as a draft.
  2. Adjust it with PUT /campaigns/{id}, as many times as you need.
  3. Check the recipient count and the price with GET /campaigns/{id}/price.
  4. Set readyToSend to true with PUT /campaigns/{id} when the configuration is final.
  5. Confirm it with PUT /campaigns/{id}/confirm: the campaign is priced, the amount is reserved and the sending starts, at once or at the scheduledDate.

POST /campaigns is one endpoint for SMS, RCS and WhatsApp: this page describes it for SMS. See it for RCS or WhatsApp.

Request​

Responses​

Campaign created, returned as stored with its id.