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
sendingModetoSMS. The campaign needs an approved sender (smsSender) and the text (smsBody). - Recipients: contact lists in
contactListIds(destinationType0), phone numbers indestinations(destinationType1), or both (destinationType2). - Schedule: set
scheduledDateto 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:
smsSendermust be an approved sender (seeGET /sms/senders). Nothing is created when the check fails. - Personalisation:
smsBodyaccepts placeholders in single braces named after your contact fields, such as{firstName}. - API key:
CAMPAIGNSopens every campaign. A key without it manages only the campaigns whosesendingModeuses its channel operations, all of them for a combined mode:SMScampaigns needSMS,RCS_SMScampaigns needRCSandSMS.
From draft to sending, step by step
- Create the campaign with
readyToSendfalse to save it as a draft. - Adjust it with
PUT /campaigns/{id}, as many times as you need. - Check the recipient count and the price with
GET /campaigns/{id}/price. - Set
readyToSendto true withPUT /campaigns/{id}when the configuration is final. - Confirm it with
PUT /campaigns/{id}/confirm: the campaign is priced, the amount is reserved and the sending starts, at once or at thescheduledDate.
POST /campaigns is one endpoint for SMS, RCS and WhatsApp: this page describes it for SMS. See it for RCS or WhatsApp.
Request
Responses
- 201
- 400
- 401
- 403
- 404
Campaign created, returned as stored with its id.
A required field is missing, sendingMode is not a valid value, or whatsappTemplateId is sent without whatsappPhoneNumberId.
The API key is missing or invalid, or holds neither CAMPAIGNS nor the operation of every channel of the campaign's sendingMode.
smsSender is not an approved sender of your account (see GET /sms/senders).
rcsTemplateId is not an enabled RCS template of your account, or whatsappPhoneNumberId is not one of your WhatsApp phone numbers.