Skip to main content
A webhook campaign sends one WhatsApp template to one end user per API call. Each accepted send is charged against the campaign wallet. A campaign created with Chosen per request holds several templates, called usecases. The call names the usecase to send. See Send a call to a usecase.

Keys and access

A campaign key is an ordinary API key with Send campaign messages and access limited to the campaign. An All resources key also works. Admins create and manage keys in Settings → Integrations → API keys. The campaign’s API keys tab lists eligible keys. On a one-template campaign, selected keys that include the campaign lock its template, parameters and number. Revoke those keys or clone the campaign before changing them. A campaign with usecases has no such lock. See Change a usecase while callers send for its rules.

Send a call to a usecase

The body of a usecase call has three fields.
A usecase campaign refuses params and media. The usecase fills the template from data, and a usecase can take its header image from a data key. A campaign with one template refuses usecase. A key that the usecase reads must hold text, a number, or true or false. A key that has no fallback must be present in data. Other keys are accepted and reach the reply conversation. The same limits as other webhook calls apply to data: up to 50 keys, 8 KB, and 5 levels. The response is the usual send result with the usecase that was sent. The Contract tab of the campaign shows one request shape for each usecase. Field errors and the codes usecase_paused, template_paused, and usecase_gone are in API errors.

Validate and send

Validate checks the request and returns pricing without sending or charging. It does not check consent or wallet balance. Validate and send share the campaign-send rate limit. Both can return a retryable problem.

Pricing and lifecycle

A send is charged before delivery. A send that fails before WhatsApp accepts it is refunded. If WhatsApp accepts a send and reports a failure later, the charge stays. Staging-mode sends are not charged. A paused campaign returns retryable campaign_paused. A cancelled or failed campaign returns terminal campaign_gone. For a usecase, a turned off usecase returns retryable usecase_paused and a retired usecase returns terminal usecase_gone. See Errors for the problem format and Run webhook campaigns for setup.