Skip to main content

Update a WhatsApp campaign

PUT 

/api/partner-gateway/campaigns/:id

Updates a campaign that has not been confirmed yet. Fields you leave out keep their value, with the exceptions below.

  • Only before confirmation: the campaign must be in status DRAFT, whether or not readyToSend is true. Once confirmed with PUT /campaigns/{id}/confirm (PRE_BILLED and later) it can no longer be updated.
  • Always required: sendingMode (send the current one to keep it) and destinationType (send the value the campaign was created with: an update cannot change it).
  • WhatsApp template: to change it, send whatsappPhoneNumberId together with whatsappTemplateId. The new template, with the content and category that set the price, is loaded only when both are sent.
  • The number is checked against your account: whatsappPhoneNumberId must be one of your WhatsApp numbers, and with WHATSAPP_SMS smsSender must be an approved sender. The campaign is not changed when a check fails.
  • After changing recipients or content, call GET /campaigns/{id}/price for the new recipient count and price.

Two fields are reset when you leave them out. An update without scheduledDate removes the schedule, and an update without readyToSend: true moves the campaign back to DRAFT. Repeat both in every update of a scheduled campaign that is ready to send.

PUT /campaigns/{id} is one endpoint for SMS, RCS and WhatsApp: this page describes it for WhatsApp. See it for SMS or RCS.

Request​

Responses​

Campaign updated, returned as stored.