Skip to main content
PUT
/
api
/
v1
/
campaigns
/
{campaignId}
Update Campaign
curl --request PUT \
  --url https://api.sequenzy.com/api/v1/campaigns/{campaignId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "subject": "<string>",
  "trackingCode": "<string>",
  "html": "<string>",
  "blocks": [
    {}
  ],
  "campaignData": {},
  "computedLists": [
    {}
  ],
  "labels": [
    {}
  ],
  "replyTo": "<string>",
  "replyProfileId": "<string>"
}
'
{
  "success": true,
  "campaign": {
    "id": "camp_abc123",
    "name": "April Launch",
    "subject": "A quick update",
    "status": "draft",
    "labels": ["edm", "launch"],
    "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"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt

Use this file to discover all available pages before exploring further.

Update a draft campaign. You can change the campaign name, subject, labels, HTML body, Sequenzy block content, campaign data, computed lists, or reply-to profile.

Request

campaignId
string
required
Campaign ID.
name
string
Updated campaign name.
subject
string
Updated email subject line.
trackingCode
string
Campaign tracking code available to UTM templates as {{campaign.trackingCode}}. Send an empty string or null to clear it.
html
string
Updated HTML body. Sequenzy converts this into email blocks.
blocks
array
Updated Sequenzy email blocks. Use this instead of html when you need editor-compatible content or conditional blocks. Do not send both html and blocks in the same request. Put block styling under styles; top-level style keys like backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius are normalized into styles.
campaignData
object
Campaign-scoped JSON data for repeat blocks and personalization. Send null to clear it.
computedLists
array
Computed list definitions derived from campaignData at send time.
labels
array
Replacement label names. Send an empty array to clear labels. Missing labels are created automatically. The API also accepts label as a compatibility alias.
replyTo
string
Existing reply profile email address for this company. Use this or replyProfileId, not both.
replyProfileId
string
Reply profile ID for this company. Use this or replyTo, not both.
campaignData
object
Campaign-scoped JSON data. For example, upload an events array that this campaign can use while rendering repeat blocks. The MVP supports up to 500 items per top-level array.
computedLists
array
Personalized list definitions that select items from campaignData using subscriber attributes. Templates can repeat over each list’s key; keys use letters, numbers, underscores, and dots only. Use maxItems to cap how many items each subscriber can receive in that list.
curl -X PUT "https://api.sequenzy.com/api/v1/campaigns/camp_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "blocks": [
      {
        "id": "pro-offer",
        "type": "text",
        "content": "<p>Your Pro upgrade is ready.</p>",
        "variant": "paragraph",
        "condition": {
          "variable": "plan",
          "operator": "equals",
          "value": "pro"
        }
      }
    ]
  }'
curl -X PUT "https://api.sequenzy.com/api/v1/campaigns/camp_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"labels": ["edm", "launch"]}'
curl -X PUT "https://api.sequenzy.com/api/v1/campaigns/camp_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "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"
          }
        ]
      }
    ]
  }'

Responses

{
  "success": true,
  "campaign": {
    "id": "camp_abc123",
    "name": "April Launch",
    "subject": "A quick update",
    "status": "draft",
    "labels": ["edm", "launch"],
    "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"
  }
}