Update a campaign

SDK platic.campaigns.update()

Change the campaign fields you send. All other fields keep their current values.

Example

await platic.campaigns.update("campaign_123", { title: "Spring sale (final)" });

Path parameters

ParameterTypeDescriptionRequirement
campaignIdstringUnique identifier of the campaignrequired

Request body

All fields are optional:

{
  "title": "Summer promo 2025 - Updated",
  "category": "marketing",
  "platform": "whatsapp",
  "templateName": "summer_promo_v2",
  "owners": ["marketing@acme.com"]
}

Available parameters

ParameterTypeDescription
titlestringCampaign title
categorystring"marketing" or "utility"
platformstringSend platform
templateNamestringTemplate name (validated)
messagestringMessage associated with the campaign
templatestringSerialized representation of the template
languagestringThe language version of the template, such as es_MX. Sending only language changes the version of the template the campaign already has
wabaIdstringAssociated WABA
ownersstring[]List of responsible-user emails
ctaTargetUrlstringThe full page (https://…) that whoever taps the template button lands on. Each recipient gets their own link, and the click and the purchase are measured. Empty does not change the current destination
ctaLabelstringThe button text, up to 60 characters. It goes with ctaTargetUrl
ctaobject | nullThe destination as an object, { "targetUrl": "…", "label": "…" }. null removes it. If both arrive, ctaTargetUrl wins

Sending a new template as JSON in message creates a draft with templateStatus: "DRAFT". It does not retain the previous template's id or approval.

Response 200 OK

{
  "status": "success",
  "message": "Campaign updated successfully",
  "data": {
    "id": "EgIOvaKPmrQFfuh6D023",
    "title": "Summer promo 2026 - VIP",
    "category": "marketing",
    "platform": "whatsapp",
    "templateName": "summer_promo_2026_vip",
    "language": "es_MX",
    "owners": ["marketing@acme.com"],
    "lastUpdate": "2026-03-03T00:41:38.326Z"
  }
}

Changing templateName or language saves the version the campaign will send. If you omit language, it uses the only available version or an approved one when there are several. See how the version is selected.

When you change the destination, the response carries cta as it ended up (null if you removed it).

Template errors

Statusdetails.codeWhen
400INVALID_CTAThe destination is not a full URL with https:// (or http://) and a valid domain
400TEMPLATE_NOT_FOUNDThere is no template with that name, or it does not have the language you sent. In the second case details.languages lists the ones it has
400TEMPLATE_NOT_APPROVEDThe chosen version is not approved. details.status says what state it is in