Update a campaign
Partial update (PUT is accepted too) of a draft, failed or paused campaign.
Autorisations
Company API key, sent as Authorization: Bearer <key>. Create it in the dashboard (Developer > API Keys) with the permissions the integration needs.
Paramètres de chemin
Corps
On update, only the fields given change. A scheduled or running campaign cannot be edited: pause it first.
Required on creation
255Required on creation. Contacts who unsubscribed get no marketing campaign.
marketing, transactional, specialized Required on creation
scheduled, new_conversation Automatic campaigns: wait after the conversation starts
Automatic campaigns: wait for the conversation to be quiet
The senders, by their channel_id (GET /channels)
whatsapp: { template_id, variables: { name: { source, value?, fallback? } }, buttons?: { index: value }, header_url? } (source: field:firstname|lastname|name|email|phone|address|identifier, column:<key> of the imported file, or text with value); an automatic campaign may send { text } instead. mail: { subject, html }. Texts accept @firstname, @<column> and @{key|fallback}.
Scheduled campaigns: { source: "segment", segment_id }, { source: "file", import_id, save_as_segment? } (a checked file, POST /campaign-imports) or { source: "contacts", contact_ids }
Required to launch
Réponse
Always HTTP 200: the outcome is in success and code (absolute value of the response code).