Campaigns

Update a draft campaign

Update a draft campaign's name, labels, content, reply-to settings, or campaign personalization data.

put/campaigns/{campaignId}

Path parameters

campaignIdstring required

Campaign ID

Request body

namestring

Updated campaign name

subjectstring

Updated email subject line

trackingCodestring nullable

Campaign tracking code available to UTM templates as {{campaign.trackingCode}}. Send an empty string or null to clear it.

htmlstring

Updated email HTML content. Mutually exclusive with blocks.

blocksobject[]

Updated Sequenzy email blocks. Mutually exclusive with html. Put visual styling under styles; top-level style keys such as backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius are normalized into styles.

replyTostring email

Existing reply profile email for this company. Mutually exclusive with replyProfileId.

replyProfileIdstring

Reply profile ID for this company. Mutually exclusive with replyTo.

labelsstring[]

Replacement label names. Send an empty array to clear labels. Missing labels are created automatically.

labelstring[]

Compatibility alias for labels.

campaignDataobject nullable

Campaign-scoped JSON data available while rendering this campaign. Top-level arrays can contain up to 500 items. Set to null to clear it.

computedListsobject[]

Personalized list definitions computed from campaignData. Keys can use letters, numbers, underscores, and dots. Use maxItems to cap each subscriber's list length. Pass an empty array to clear computed lists.

Example request

{
  "name": "April Launch",
  "subject": "A quick update",
  "html": "<p>Hello there!</p>",
  "replyTo": "support@example.com",
  "replyProfileId": "reply_abc123",
  "labels": [
    "edm",
    "api"
  ],
  "label": [
    "edm",
    "api"
  ],
  "campaignData": {
    "events": [
      {
        "id": "evt_123",
        "title": "Romeo and Juliet",
        "region": "Auckland",
        "genre": "theatre",
        "url": "https://example.com/events/evt_123"
      }
    ]
  },
  "computedLists": [
    {
      "key": "recommendedEvents",
      "source": "events",
      "maxItems": 6,
      "rules": [
        {
          "itemField": "region",
          "operator": "equals",
          "subscriberField": "region"
        },
        {
          "itemField": "genre",
          "operator": "in",
          "subscriberField": "interests"
        }
      ]
    }
  ]
}

Response

Campaign updated successfully

successboolean required

Example response

{
  "success": true,
  "campaign": {
    "id": "camp_abc123",
    "name": "April Launch",
    "subject": "A quick update",
    "status": "draft",
    "labels": [
      "edm",
      "api"
    ],
    "replyProfileId": "reply_abc123",
    "replyToName": "Support",
    "replyToEmail": "support@example.com",
    "url": "https://sequenzy.com/dashboard/company/comp_abc123/campaign/camp_abc123",
    "previewUrl": "https://sequenzy.com/dashboard/company/comp_abc123/campaign/camp_abc123?step=review"
  }
}

Changes