Skip to main content
POST
/
api
/
v1
/
campaigns
Create Campaign
curl --request POST \
  --url https://api.sequenzy.com/api/v1/campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "subject": "<string>",
  "trackingCode": "<string>",
  "html": "<string>",
  "blocks": [
    {}
  ],
  "labels": [
    {}
  ],
  "campaignData": {},
  "computedLists": [
    {}
  ]
}
'
{
  "success": true,
  "campaign": {
    "id": "camp_abc123",
    "name": "April Launch",
    "subject": "A quick update",
    "status": "draft",
    "trackingCode": null,
    "labels": ["edm", "launch"],
    "url": "https://sequenzy.com/dashboard/company/comp_abc123/campaign/camp_abc123",
    "previewUrl": "https://sequenzy.com/dashboard/company/comp_abc123/campaign/camp_abc123?step=review"
  }
}
Create a draft campaign and linked email. You must have at least one sender profile configured before creating campaigns through the API.

Request

name
string
required
Campaign name.
subject
string
required
Email subject line.
trackingCode
string
Optional campaign tracking code available to UTM templates as {{campaign.trackingCode}}. Empty strings are stored as null.
html
string
Raw HTML body. Sequenzy converts this into email blocks. Use this or blocks, not both.
blocks
array
Sequenzy email blocks. Use this or html, not both. Put block styling under styles; top-level style keys like backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius are normalized into styles.
labels
array
Label names to assign to the campaign. Missing labels are created automatically. The API also accepts label as a compatibility alias.
campaignData
object
Campaign-scoped JSON data available while rendering this campaign.
computedLists
array
Personalized list definitions computed from campaignData.
curl -X POST "https://api.sequenzy.com/api/v1/campaigns" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "April Launch",
    "subject": "A quick update",
    "labels": ["edm", "launch"],
    "html": "<p>Hello there!</p>"
  }'

Responses

{
  "success": true,
  "campaign": {
    "id": "camp_abc123",
    "name": "April Launch",
    "subject": "A quick update",
    "status": "draft",
    "trackingCode": null,
    "labels": ["edm", "launch"],
    "url": "https://sequenzy.com/dashboard/company/comp_abc123/campaign/camp_abc123",
    "previewUrl": "https://sequenzy.com/dashboard/company/comp_abc123/campaign/camp_abc123?step=review"
  }
}