Skip to main content

WhatsApp campaigns

Quick guideโ€‹

A WhatsApp campaign sends an approved template to the contacts of one or more lists, to phone numbers written in the request, or to both. You need a phone number (whatsappPhoneNumberId), an APPROVED template of that number (whatsappTemplateId) and the recipients.

SMS fallback: with sendingMode WHATSAPP_SMS the campaign tries WhatsApp first, then SMS. It then needs an SMS sender (smsSender) and the text (smsBody) too.

Three channels: with sendingMode RCS_WHATSAPP_SMS the campaign tries RCS first, then WhatsApp, then SMS. Besides the SMS fields it needs the RCS ones, an agent (rcsAgentId) and a template (rcsTemplateId, with its rcsTemplateType): they are described in Create an RCS campaign. A three-channel campaign always tries RCS first: WHATSAPP_RCS_SMS is accepted, but stored and sent as RCS_WHATSAPP_SMS once the campaign has its rcsAgentId, which it needs to be confirmed.

Recipients: destinationType says where they come from. 0 takes the contact lists in contactListIds; 1 the phone numbers in destinations, in international format, without creating contacts; 2 both.

  1. Create the campaign with POST /campaigns and sendingMode WHATSAPP: it starts as a draft.
  2. Complete it with PUT /campaigns/{id}, and set readyToSend: true when it is final.
  3. Check the price with GET /campaigns/{id}/price.
  4. Confirm it with PUT /campaigns/{id}/confirm: the amount is reserved, and the campaign leaves at once or at its scheduledDate. From then on it can no longer be changed.
  5. Follow it with GET /campaigns/{id} and GET /campaigns/stats, or export its delivery reports from Exports. Webhooks do not report the delivery of campaign messages.

These endpoints are the same for every channel: this section describes them for WhatsApp. Each page links to the same endpoint for SMS and RCS.

Use cases: UC-008: Bulk WhatsApp Template Campaign ยท UC-002: Complete Campaign Report