v101

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-08235133843.7 KB
Campaigns

Update a draft campaign

Update a draft campaign's name, labels, content, audience, From/Reply-To settings, or campaign personalization data. Direct addresses create profiles when needed.

put/campaigns/{campaignId}

Path parameters

campaignIdstring required

Campaign ID

Request body

namestring

Updated campaign name

subjectstring

Updated email subject line

previewTextstring nullable

Updated inbox preview text. Set to null to clear it.

preheaderTextstring nullable

Compatibility alias for previewText.

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.

fromEmailstring email

Campaign From address. Its domain must be configured and verified.

fromNamestring

Display name recipients see, e.g. 'Brennon at TradeTally'. Selects the sender identity of that name on fromEmail, creating it when the address has no identity by that name; the mailbox's other display names, and everything pinned to them, are untouched. Requires fromEmail; omit it when using senderProfileId, which already carries its own display name.

senderProfileIdstring

Existing sender profile ID. It already supplies both the From address and display name, so send it on its own and omit fromEmail and fromName.

replyTostring email

Reply-To email for this campaign. A profile is created when needed. Mutually exclusive with replyProfileId.

replyProfileIdstring

Reply profile ID for this company. It already supplies both the Reply-To address and display name, so send it on its own and omit replyTo and replyToName.

replyToNamestring

Display name for the Reply-To address. Requires replyTo; omit it when using replyProfileId, which already carries its own display name. An address carries one Reply-To name company-wide, so if replyTo already has a saved profile under a different name, that saved name is kept and the response warnings array says so.

ccEmailsstring[] nullable

Addresses CC'd on every recipient's email for this campaign. Send an empty array or null to clear them.

bccEmailsstring[] nullable

Addresses BCC'd on every recipient's email for this campaign. Send an empty array or null to clear them.

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.

targetListsobject nullable

Replacement campaign audience, using the same shapes as campaign create. Send null to clear saved targeting and choose the audience when scheduling; omit to leave it unchanged. Mutually exclusive with segmentId.

segmentIdstring

Shorthand for retargeting the draft at one saved segment. Equivalent to targetLists {"type":"segment","segmentId":"seg_123"}. Mutually exclusive with targetLists.

Example request

{
  "name": "April Launch",
  "subject": "A quick update",
  "previewText": "A short preview for the inbox",
  "preheaderText": "A short preview for the inbox",
  "html": "<p>Hello there!</p>",
  "replyTo": "support@example.com",
  "replyProfileId": "reply_abc123",
  "ccEmails": [
    "ops@example.com"
  ],
  "bccEmails": [
    "archive@example.com"
  ],
  "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
warningsstring[]

Non-blocking advisories about a successful write. Present when an input was discarded or did not take effect as requested. This includes block fields that do not render as their names suggest, sequence email-step formatting restored on top of submitted blocks, and sender-identity conflicts such as a replyToName that differs from the saved profile. Each message identifies the affected input and gives recovery guidance. Absent when there is nothing to report.

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",
    "ccEmails": [
      "ops@example.com"
    ],
    "bccEmails": [
      "archive@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"
  },
  "warnings": [
    "blocks[0].styles.color is not a supported field and was ignored. Button label color comes from the block-level `buttonTextColor` field. Supported styles fields: backgroundColor, backgroundOpacity, bleed, borderColor, borderRadius, borderWidth, paddingBottom, paddingLeft, paddingRight, paddingTop, textAlign, textColor."
  ]
}