Campaigns ​

Full reference for the Campaigns resource in the bluefox.email API. See the API overview for authentication, the response envelope, and pagination.

List campaigns ​

GET /v1/projectId/{projectId}/campaigns

Parameters ​

NameInTypeRequiredDescription
projectIdpathstringyesThe project _id, found in the app under Project Settings.
limitqueryintegerMax items per page. Capped at 30.
skipqueryintegerNumber of items to skip, for pagination.
sortquerystringField to sort by.
orderquerystring
filter[<field>]querystringExact-match filter on a top-level field, e.g. filter[name]=Welcome. Repeatable for multiple fields.

Responses ​

StatusDescription
200OK
403Missing or invalid API key

Response body ​

FieldTypeRequiredDescription
itemsarray
countintegerTotal matching items across all pages, not just this page.
nextstringFull URL (path + query string) of the next page, or null if this is the last page.

Create a campaign ​

POST /v1/projectId/{projectId}/campaigns

subscriberListId and segmentId (if given) must belong to this same project - a valid ID from a different project 404s. Status "scheduled" requires a valid, parseable scheduledTo (a 400 otherwise), plus the project having usable sending credentials and enough account credit for the recipient count; missing any of these fails the whole create with a 400/405 rather than creating a draft.

Parameters ​

NameInTypeRequiredDescription
projectIdpathstringyesThe project _id, found in the app under Project Settings.

Request body ​

FieldTypeRequiredDescription
namestringyes
subjectstringyes
previewTextstringOptional, but meaningfully affects open rates - if the user hasn't given you one, ask what they'd like it to say rather than leaving it blank.
timeZonestringyesIANA time zone, e.g. "America/New_York". Stored with the campaign and shown next to the scheduled time in the app; it does not shift scheduledTo, which must be an absolute instant.
subscriberListIdstringyesRequired. If the user hasn't told you which list to send to, call GET /v1/projectId/{projectId}/subscriber-lists first and ask them to choose from the real list names - don't ask them for a raw ID.
segmentIdstringOptional - narrows the subscriberListId down further. If the user mentions targeting a specific segment by name but doesn't give an ID, call GET /v1/projectId/{projectId}/segments first and ask them to choose from the real names.
statusstring (draft | archive | scheduled)Set to "scheduled" together with a valid scheduledTo to schedule sending. Status "scheduled" without a parseable scheduledTo is rejected with a 400.
scheduledTostringAbsolute ISO 8601 date-time (with a UTC offset or trailing "Z"). Required when status is "scheduled".
excludeUnengagedboolean
webVersionEnabledbooleanTurns on the public web version ("view in browser" page) of the campaign. Defaults to false. The page only works while this is true and the status is "sent" or "archive".
senderIdentitystringA sender identity _id. If the user hasn't told you which one to use, call GET /v1/projectId/{projectId}/sender-identities first and ask them to choose from the real email addresses returned - don't ask them for a raw ID.
replyTostring
typestring (chamaileon | html | text)Omit to keep the current type (new emails default to "chamaileon", the visual editor). Set to "html" or "text" to author document as a raw Handlebars template string instead (see the document field), or "chamaileon" to switch back to a visual editor JSON document.
documentanyThe email content. When type is "chamaileon" (the default): A Chamaileon visual-editor JSON document (type "chamaileon"): an object with a top-level "body". To change an existing design, GET the email/template, edit its document and send it back. To write one: {"body":{"type":"body","style":{"backgroundColor":"#f4f4f4"},"children":[fullwidth elements]}}. - A fullwidth element is {"type":"fullwidth","style":{"contentBackgroundColor":"#ffffff","contentPaddingTop":"20px",...},"children":[elements]} (600px wide). - Elements inside it: {"type":"text","attrs":{"text":"<h1>..</h1><p>..</p>"},"style":{"paragraphFontFamily":"Verdana, Geneva, sans-serif","paragraphColor":"#333333","paragraphFontSize":"16px","linkColor":"#0094c5","h1FontFamily":"Georgia, serif","h1Color":"#111111"}} (also h2/h3 FontFamily, Color, FontSize - set link colors here, an inline color on <a> is overridden), {"type":"button","attrs":{"text":"<p>Shop</p>","href":"https://.."},"style":{"backgroundColor":"#0094c5"}}, {"type":"image","attrs":{"src":"https://..","altText":"..","link":""},"style":{"width":"560px","maxWidth":"560px"}}, {"type":"divider"}, {"type":"social","attrs":{"elements":[{"type":"Facebook","link":"https://..","src":"img/Facebook/fb-3-colorful.png"}],"color":"colorful","iconSet":3}} (src is img/<network>/<prefix>-<iconSet>-<color>.png; iconSet 1-5; color colorful, black, grey or white; networks and prefixes: Blogger BL, Facebook fb, Instagram ig, Linkedin li, Medium ME, Pinterest PT, Snapchat SN, SoundCloud SC, Spotify SP, Telegram TG, TikTok tt, Tumblr TU, Twitter tw, Vimeo VI, Vkontakte VK, WeChat WC, YouTube YT), {"type":"box","style":{"backgroundColor":"..","paddingTop":"16px","borderRadius":"8px"},"children":[elements]}, columns {"type":"multicolumn","children":[{"type":"column","style":{"width":"280px"},"children":[elements]}, ...]} (widths add up to the space available), {"type":"typed-text","attrs":{"text":"Plain text"},"style":{"subType":"heading1","fontSize":"32px","color":"#111111","fontFamily":"Georgia, serif","align":"center","bold":true}} (subType paragraph, heading1-3 or list; takes plain text and its own style, while text takes HTML), {"type":"code","attrs":{"title":"Custom HTML","content":"<div style="font-size:16px">..</div>"}} (raw HTML, it must set its own font-size), {"type":"dynamic-image","attrs":{"src":"{{this.image.url}}","altText":".."},"style":{"width":"150px","height":"150px"}} (image URL from a merge tag), {"type":"video","attrs":{"videoId":"..","videoProvider":"youtube","link":"https://..","previewBaseUrl":"https://video.chamaileon.io/thumbnail/original/","thumbnailBaseUrl":"https://video.chamaileon.io/thumbnail/generated/"}} (thumbnail generated from the videoId; not in the app editor's toolbox). - Personalization: {"type":"loop","attrs":{"expression":"news.item limit=5 skip=0"},"children":[elements]} repeats its children per feed item (use {{this.title}} inside; add the feed in the feeds field), and {"type":"conditional","children":[{"type":"branch","attrs":{"type":"if","expression":"(EQ contact.plan "pro")"},"children":[elements]},{"type":"branch","attrs":{"type":"else"},"children":[elements]}]} (branch type if, else-if or else). block-level-loop and block-level-conditional work the same but sit directly in body and wrap whole fullwidth elements. - To give conditional branches different backgrounds, put a box with the background in each branch: the generator can apply the first branch's fullwidth colors to all branches. - Nesting: body holds only fullwidth and block-level-*; fullwidth, box, column, loop and branch hold elements; multicolumn holds only column; conditional holds only branch. - Colors, fonts and images can use a design system variable, e.g. "color":{"reference":"name","default":"#111111"} (see GET /v1/projectId/{projectId}/design-systems). - Every element needs a unique "eid" and style values are CSS strings with px units. The MCP server fills in any missing eid and the editor's default style/attrs keys for you; this API stores the document exactly as sent, so send complete elements (e.g. copy them from an existing document). - Merge tags like {{contact.name}} and {{unsubscribeLink}} work in text and links. Quote strings in them with single quotes, e.g. {{DEFAULT contact.url 'https://..'}}: double quotes break the generated src and href attributes. When type is "html" or "text", this is a plain string rendered with Handlebars at send time, and can use merge tags: - &#123;&#123;contact.email&#125;&#125;, &#123;&#123;contact.name&#125;&#125;, and &#123;&#123;contact.&lt;yourCustomFieldName&gt;&#125;&#125; for any field from GET /v1/projectId/{projectId}/contacts/fields. Contact data is ONLY available under the contact. prefix - bare tags like &#123;&#123;name&#125;&#125;, &#123;&#123;firstName&#125;&#125; or &#123;&#123;email&#125;&#125; render as empty strings. For a fallback use DEFAULT, e.g. Hi &#123;&#123;DEFAULT contact.name "there"&#125;&#125;,. - &#123;&#123;unsubscribeLink&#125;&#125; and &#123;&#123;pauseSubscriptionLink&#125;&#125; - available for campaign/triggered/automation emails (subscriber-list-bound), NOT for transactional emails. - &#123;&#123;webVersionLink&#125;&#125; - campaigns only: a public "view in browser" link to the campaign (the same link for every recipient, also shown on the campaign card in the app). It is not personalized - contact merge tags show their DEFAULT fallback. It only works while the campaign's webVersionEnabled is true and its status is "sent" or "archive" (when adding this tag, also set webVersionEnabled: true), and always shows the latest version of the campaign (edits made after sending are visible to earlier recipients). - Any feed's variableName (see the feeds field) as a loop, e.g. &#123;&#123;#each news.item limit=5 skip=0&#125;&#125;...&#123;&#123;this.title&#125;&#125;...&#123;&#123;/each&#125;&#125;. - Standard &#123;&#123;#if&#125;&#125;/&#123;&#123;#unless&#125;&#125;, plus custom helpers AND, OR, NOT, EQ, INCLUDES, CAPITALIZE, TRUNCATE, DEFAULT, usable like &#123;&#123;#if (EQ contact.plan "pro")&#125;&#125;...&#123;&#123;/if&#125;&#125;. For transactional/triggered sends, whatever object is passed as data on POST /v1/projectId/{projectId}/send-transactional or /v1/projectId/{projectId}/send-triggered is merged directly into the TOP LEVEL of the template context (not nested under a "data" key) - so sending data: &#123; "orderId": 123 &#125; makes &#123;&#123;orderId&#125;&#125; available, not &#123;&#123;data.orderId&#125;&#125;.
feedsarray of objectRSS/Atom/JSON feeds to pull into this email - see variableName on each feed for how to reference it from document.
feeds[].urlstringyes
feeds[].feedTypestring (rss-xml | json)yes"rss-xml" covers both RSS and Atom XML feeds - which one it actually is gets auto-detected from the feed content itself, which changes the array key inside the template (see variableName below).
feeds[].variableNamestringyesNo spaces allowed. This becomes a top-level Handlebars variable in the document (see the document field on the parent email for the templating syntax). The feed's parsed items are NOT directly at &#123;&#123;variableName&#125;&#125; - they're nested under a feed-shape-dependent array key you loop over with the custom each helper: - feedType "rss-xml" that turns out to be RSS: &#123;&#123;#each &lt;variableName&gt;.item&#125;&#125;...&#123;&#123;/each&#125;&#125; (array key is the literal word "item", singular) - feedType "rss-xml" that turns out to be Atom: &#123;&#123;#each &lt;variableName&gt;.entry&#125;&#125;...&#123;&#123;/each&#125;&#125; (array key is "entry") - feedType "json": the array key is whatever field the source JSON actually uses for its list (e.g. "items", "articles") - inspect the feed's JSON to find it, it is not fixed. Inside the loop, each item's own fields are whatever the feed provides (e.g. RSS gives &#123;&#123;this.title&#125;&#125;, &#123;&#123;this.link&#125;&#125;, &#123;&#123;this.pubDate&#125;&#125;) - there is no fixed schema, it mirrors the feed's actual content one-to-one.
feeds[].maxItemsintegerInformational only - NOT enforced when the email is sent. To actually limit how many items render, pass limit (and optionally skip) as hash arguments on the each tag itself, e.g. &#123;&#123;#each news.item limit=5 skip=0&#125;&#125;.
feeds[].requiredboolean
feeds[].availableFieldsarray of stringInformational only, for the app UI - not enforced or used when rendering.
trackOpensbooleanDefaults to true. When false, no open-tracking pixel is added to this email, so opens are not recorded (open stats and open-based segments/conditions get no data from it).
trackClicksbooleanDefaults to true. When false, links in this email are sent as-is instead of through the click tracker, so clicks are not recorded (click stats and click-based segments/conditions get no data from it).

Responses ​

StatusDescription
201Created
400Invalid request body or query - every violation found (missing/invalid/unexpected fields) is reported in one response, semicolon-separated, not just the first one hit.
403Missing or invalid API key

Response body ​

FieldTypeRequiredDescription
_idstring
namestring
statusstring (draft | archive | sent | scheduled | being-sent | error)
subjectstring
previewTextstring
timeZonestring
subscriberListIdstring
segmentIdstring
scheduledTostring
senderIdentitystring
replyTostring
typestring (chamaileon | html | text)
excludeUnengagedboolean
webVersionEnabledboolean
trackOpensbooleanDefaults to true. When false, no open-tracking pixel is added to this email, so opens are not recorded (open stats and open-based segments/conditions get no data from it).
trackClicksbooleanDefaults to true. When false, links in this email are sent as-is instead of through the click tracker, so clicks are not recorded (click stats and click-based segments/conditions get no data from it).
feedsarray of object
feeds[].urlstringyes
feeds[].feedTypestring (rss-xml | json)yes"rss-xml" covers both RSS and Atom XML feeds - which one it actually is gets auto-detected from the feed content itself, which changes the array key inside the template (see variableName below).
feeds[].variableNamestringyesNo spaces allowed. This becomes a top-level Handlebars variable in the document (see the document field on the parent email for the templating syntax). The feed's parsed items are NOT directly at &#123;&#123;variableName&#125;&#125; - they're nested under a feed-shape-dependent array key you loop over with the custom each helper: - feedType "rss-xml" that turns out to be RSS: &#123;&#123;#each &lt;variableName&gt;.item&#125;&#125;...&#123;&#123;/each&#125;&#125; (array key is the literal word "item", singular) - feedType "rss-xml" that turns out to be Atom: &#123;&#123;#each &lt;variableName&gt;.entry&#125;&#125;...&#123;&#123;/each&#125;&#125; (array key is "entry") - feedType "json": the array key is whatever field the source JSON actually uses for its list (e.g. "items", "articles") - inspect the feed's JSON to find it, it is not fixed. Inside the loop, each item's own fields are whatever the feed provides (e.g. RSS gives &#123;&#123;this.title&#125;&#125;, &#123;&#123;this.link&#125;&#125;, &#123;&#123;this.pubDate&#125;&#125;) - there is no fixed schema, it mirrors the feed's actual content one-to-one.
feeds[].maxItemsintegerInformational only - NOT enforced when the email is sent. To actually limit how many items render, pass limit (and optionally skip) as hash arguments on the each tag itself, e.g. &#123;&#123;#each news.item limit=5 skip=0&#125;&#125;.
feeds[].requiredboolean
feeds[].availableFieldsarray of stringInformational only, for the app UI - not enforced or used when rendering.
errorMessagestring
createdAtstring
updatedAtstring

Get a single campaign ​

GET /v1/projectId/{projectId}/campaigns/{id}

Parameters ​

NameInTypeRequiredDescription
projectIdpathstringyesThe project _id, found in the app under Project Settings.
idpathstringyes

Responses ​

StatusDescription
200OK
403Missing or invalid API key
404Campaigns not found

Response body ​

FieldTypeRequiredDescription
_idstring
namestring
statusstring (draft | archive | sent | scheduled | being-sent | error)
subjectstring
previewTextstring
timeZonestring
subscriberListIdstring
segmentIdstring
scheduledTostring
senderIdentitystring
replyTostring
typestring (chamaileon | html | text)
excludeUnengagedboolean
webVersionEnabledboolean
trackOpensbooleanDefaults to true. When false, no open-tracking pixel is added to this email, so opens are not recorded (open stats and open-based segments/conditions get no data from it).
trackClicksbooleanDefaults to true. When false, links in this email are sent as-is instead of through the click tracker, so clicks are not recorded (click stats and click-based segments/conditions get no data from it).
feedsarray of object
feeds[].urlstringyes
feeds[].feedTypestring (rss-xml | json)yes"rss-xml" covers both RSS and Atom XML feeds - which one it actually is gets auto-detected from the feed content itself, which changes the array key inside the template (see variableName below).
feeds[].variableNamestringyesNo spaces allowed. This becomes a top-level Handlebars variable in the document (see the document field on the parent email for the templating syntax). The feed's parsed items are NOT directly at &#123;&#123;variableName&#125;&#125; - they're nested under a feed-shape-dependent array key you loop over with the custom each helper: - feedType "rss-xml" that turns out to be RSS: &#123;&#123;#each &lt;variableName&gt;.item&#125;&#125;...&#123;&#123;/each&#125;&#125; (array key is the literal word "item", singular) - feedType "rss-xml" that turns out to be Atom: &#123;&#123;#each &lt;variableName&gt;.entry&#125;&#125;...&#123;&#123;/each&#125;&#125; (array key is "entry") - feedType "json": the array key is whatever field the source JSON actually uses for its list (e.g. "items", "articles") - inspect the feed's JSON to find it, it is not fixed. Inside the loop, each item's own fields are whatever the feed provides (e.g. RSS gives &#123;&#123;this.title&#125;&#125;, &#123;&#123;this.link&#125;&#125;, &#123;&#123;this.pubDate&#125;&#125;) - there is no fixed schema, it mirrors the feed's actual content one-to-one.
feeds[].maxItemsintegerInformational only - NOT enforced when the email is sent. To actually limit how many items render, pass limit (and optionally skip) as hash arguments on the each tag itself, e.g. &#123;&#123;#each news.item limit=5 skip=0&#125;&#125;.
feeds[].requiredboolean
feeds[].availableFieldsarray of stringInformational only, for the app UI - not enforced or used when rendering.
errorMessagestring
createdAtstring
updatedAtstring

Partially update a campaign ​

PATCH /v1/projectId/{projectId}/campaigns/{id}

Merges the given fields into the existing document - omitted fields are left unchanged. Nothing is required (unlike create) since every field is optional on a partial update.

subscriberListId/segmentId are re-validated the same way as create. A campaign cannot be updated (including un-scheduling it) within 6 minutes of its scheduledTo time - it 400s with a message that says "5 minutes" but the actual cutoff is 6.

Parameters ​

NameInTypeRequiredDescription
projectIdpathstringyesThe project _id, found in the app under Project Settings.
idpathstringyes

Request body ​

FieldTypeRequiredDescription
namestring
subjectstring
previewTextstringOptional, but meaningfully affects open rates - if the user hasn't given you one, ask what they'd like it to say rather than leaving it blank.
timeZonestringIANA time zone, e.g. "America/New_York". Stored with the campaign and shown next to the scheduled time in the app; it does not shift scheduledTo, which must be an absolute instant.
subscriberListIdstringRequired. If the user hasn't told you which list to send to, call GET /v1/projectId/{projectId}/subscriber-lists first and ask them to choose from the real list names - don't ask them for a raw ID.
segmentIdstringOptional - narrows the subscriberListId down further. If the user mentions targeting a specific segment by name but doesn't give an ID, call GET /v1/projectId/{projectId}/segments first and ask them to choose from the real names.
statusstring (draft | archive | scheduled)Set to "scheduled" together with a valid scheduledTo to schedule sending. Status "scheduled" without a parseable scheduledTo is rejected with a 400.
scheduledTostringAbsolute ISO 8601 date-time (with a UTC offset or trailing "Z"). Required when status is "scheduled".
excludeUnengagedboolean
webVersionEnabledbooleanTurns on the public web version ("view in browser" page) of the campaign. Defaults to false. The page only works while this is true and the status is "sent" or "archive".
senderIdentitystringA sender identity _id. If the user hasn't told you which one to use, call GET /v1/projectId/{projectId}/sender-identities first and ask them to choose from the real email addresses returned - don't ask them for a raw ID.
replyTostring
typestring (chamaileon | html | text)Omit to keep the current type (new emails default to "chamaileon", the visual editor). Set to "html" or "text" to author document as a raw Handlebars template string instead (see the document field), or "chamaileon" to switch back to a visual editor JSON document.
documentanyThe email content. When type is "chamaileon" (the default): A Chamaileon visual-editor JSON document (type "chamaileon"): an object with a top-level "body". To change an existing design, GET the email/template, edit its document and send it back. To write one: {"body":{"type":"body","style":{"backgroundColor":"#f4f4f4"},"children":[fullwidth elements]}}. - A fullwidth element is {"type":"fullwidth","style":{"contentBackgroundColor":"#ffffff","contentPaddingTop":"20px",...},"children":[elements]} (600px wide). - Elements inside it: {"type":"text","attrs":{"text":"<h1>..</h1><p>..</p>"},"style":{"paragraphFontFamily":"Verdana, Geneva, sans-serif","paragraphColor":"#333333","paragraphFontSize":"16px","linkColor":"#0094c5","h1FontFamily":"Georgia, serif","h1Color":"#111111"}} (also h2/h3 FontFamily, Color, FontSize - set link colors here, an inline color on <a> is overridden), {"type":"button","attrs":{"text":"<p>Shop</p>","href":"https://.."},"style":{"backgroundColor":"#0094c5"}}, {"type":"image","attrs":{"src":"https://..","altText":"..","link":""},"style":{"width":"560px","maxWidth":"560px"}}, {"type":"divider"}, {"type":"social","attrs":{"elements":[{"type":"Facebook","link":"https://..","src":"img/Facebook/fb-3-colorful.png"}],"color":"colorful","iconSet":3}} (src is img/<network>/<prefix>-<iconSet>-<color>.png; iconSet 1-5; color colorful, black, grey or white; networks and prefixes: Blogger BL, Facebook fb, Instagram ig, Linkedin li, Medium ME, Pinterest PT, Snapchat SN, SoundCloud SC, Spotify SP, Telegram TG, TikTok tt, Tumblr TU, Twitter tw, Vimeo VI, Vkontakte VK, WeChat WC, YouTube YT), {"type":"box","style":{"backgroundColor":"..","paddingTop":"16px","borderRadius":"8px"},"children":[elements]}, columns {"type":"multicolumn","children":[{"type":"column","style":{"width":"280px"},"children":[elements]}, ...]} (widths add up to the space available), {"type":"typed-text","attrs":{"text":"Plain text"},"style":{"subType":"heading1","fontSize":"32px","color":"#111111","fontFamily":"Georgia, serif","align":"center","bold":true}} (subType paragraph, heading1-3 or list; takes plain text and its own style, while text takes HTML), {"type":"code","attrs":{"title":"Custom HTML","content":"<div style="font-size:16px">..</div>"}} (raw HTML, it must set its own font-size), {"type":"dynamic-image","attrs":{"src":"{{this.image.url}}","altText":".."},"style":{"width":"150px","height":"150px"}} (image URL from a merge tag), {"type":"video","attrs":{"videoId":"..","videoProvider":"youtube","link":"https://..","previewBaseUrl":"https://video.chamaileon.io/thumbnail/original/","thumbnailBaseUrl":"https://video.chamaileon.io/thumbnail/generated/"}} (thumbnail generated from the videoId; not in the app editor's toolbox). - Personalization: {"type":"loop","attrs":{"expression":"news.item limit=5 skip=0"},"children":[elements]} repeats its children per feed item (use {{this.title}} inside; add the feed in the feeds field), and {"type":"conditional","children":[{"type":"branch","attrs":{"type":"if","expression":"(EQ contact.plan "pro")"},"children":[elements]},{"type":"branch","attrs":{"type":"else"},"children":[elements]}]} (branch type if, else-if or else). block-level-loop and block-level-conditional work the same but sit directly in body and wrap whole fullwidth elements. - To give conditional branches different backgrounds, put a box with the background in each branch: the generator can apply the first branch's fullwidth colors to all branches. - Nesting: body holds only fullwidth and block-level-*; fullwidth, box, column, loop and branch hold elements; multicolumn holds only column; conditional holds only branch. - Colors, fonts and images can use a design system variable, e.g. "color":{"reference":"name","default":"#111111"} (see GET /v1/projectId/{projectId}/design-systems). - Every element needs a unique "eid" and style values are CSS strings with px units. The MCP server fills in any missing eid and the editor's default style/attrs keys for you; this API stores the document exactly as sent, so send complete elements (e.g. copy them from an existing document). - Merge tags like {{contact.name}} and {{unsubscribeLink}} work in text and links. Quote strings in them with single quotes, e.g. {{DEFAULT contact.url 'https://..'}}: double quotes break the generated src and href attributes. When type is "html" or "text", this is a plain string rendered with Handlebars at send time, and can use merge tags: - &#123;&#123;contact.email&#125;&#125;, &#123;&#123;contact.name&#125;&#125;, and &#123;&#123;contact.&lt;yourCustomFieldName&gt;&#125;&#125; for any field from GET /v1/projectId/{projectId}/contacts/fields. Contact data is ONLY available under the contact. prefix - bare tags like &#123;&#123;name&#125;&#125;, &#123;&#123;firstName&#125;&#125; or &#123;&#123;email&#125;&#125; render as empty strings. For a fallback use DEFAULT, e.g. Hi &#123;&#123;DEFAULT contact.name "there"&#125;&#125;,. - &#123;&#123;unsubscribeLink&#125;&#125; and &#123;&#123;pauseSubscriptionLink&#125;&#125; - available for campaign/triggered/automation emails (subscriber-list-bound), NOT for transactional emails. - &#123;&#123;webVersionLink&#125;&#125; - campaigns only: a public "view in browser" link to the campaign (the same link for every recipient, also shown on the campaign card in the app). It is not personalized - contact merge tags show their DEFAULT fallback. It only works while the campaign's webVersionEnabled is true and its status is "sent" or "archive" (when adding this tag, also set webVersionEnabled: true), and always shows the latest version of the campaign (edits made after sending are visible to earlier recipients). - Any feed's variableName (see the feeds field) as a loop, e.g. &#123;&#123;#each news.item limit=5 skip=0&#125;&#125;...&#123;&#123;this.title&#125;&#125;...&#123;&#123;/each&#125;&#125;. - Standard &#123;&#123;#if&#125;&#125;/&#123;&#123;#unless&#125;&#125;, plus custom helpers AND, OR, NOT, EQ, INCLUDES, CAPITALIZE, TRUNCATE, DEFAULT, usable like &#123;&#123;#if (EQ contact.plan "pro")&#125;&#125;...&#123;&#123;/if&#125;&#125;. For transactional/triggered sends, whatever object is passed as data on POST /v1/projectId/{projectId}/send-transactional or /v1/projectId/{projectId}/send-triggered is merged directly into the TOP LEVEL of the template context (not nested under a "data" key) - so sending data: &#123; "orderId": 123 &#125; makes &#123;&#123;orderId&#125;&#125; available, not &#123;&#123;data.orderId&#125;&#125;.
feedsarray of objectRSS/Atom/JSON feeds to pull into this email - see variableName on each feed for how to reference it from document.
feeds[].urlstring
feeds[].feedTypestring (rss-xml | json)"rss-xml" covers both RSS and Atom XML feeds - which one it actually is gets auto-detected from the feed content itself, which changes the array key inside the template (see variableName below).
feeds[].variableNamestringNo spaces allowed. This becomes a top-level Handlebars variable in the document (see the document field on the parent email for the templating syntax). The feed's parsed items are NOT directly at &#123;&#123;variableName&#125;&#125; - they're nested under a feed-shape-dependent array key you loop over with the custom each helper: - feedType "rss-xml" that turns out to be RSS: &#123;&#123;#each &lt;variableName&gt;.item&#125;&#125;...&#123;&#123;/each&#125;&#125; (array key is the literal word "item", singular) - feedType "rss-xml" that turns out to be Atom: &#123;&#123;#each &lt;variableName&gt;.entry&#125;&#125;...&#123;&#123;/each&#125;&#125; (array key is "entry") - feedType "json": the array key is whatever field the source JSON actually uses for its list (e.g. "items", "articles") - inspect the feed's JSON to find it, it is not fixed. Inside the loop, each item's own fields are whatever the feed provides (e.g. RSS gives &#123;&#123;this.title&#125;&#125;, &#123;&#123;this.link&#125;&#125;, &#123;&#123;this.pubDate&#125;&#125;) - there is no fixed schema, it mirrors the feed's actual content one-to-one.
feeds[].maxItemsintegerInformational only - NOT enforced when the email is sent. To actually limit how many items render, pass limit (and optionally skip) as hash arguments on the each tag itself, e.g. &#123;&#123;#each news.item limit=5 skip=0&#125;&#125;.
feeds[].requiredboolean
feeds[].availableFieldsarray of stringInformational only, for the app UI - not enforced or used when rendering.
trackOpensbooleanDefaults to true. When false, no open-tracking pixel is added to this email, so opens are not recorded (open stats and open-based segments/conditions get no data from it).
trackClicksbooleanDefaults to true. When false, links in this email are sent as-is instead of through the click tracker, so clicks are not recorded (click stats and click-based segments/conditions get no data from it).

Responses ​

StatusDescription
200OK
400Invalid request body or query - every violation found (missing/invalid/unexpected fields) is reported in one response, semicolon-separated, not just the first one hit.
403Missing or invalid API key
404Campaigns not found

Response body ​

FieldTypeRequiredDescription
_idstring
namestring
statusstring (draft | archive | sent | scheduled | being-sent | error)
subjectstring
previewTextstring
timeZonestring
subscriberListIdstring
segmentIdstring
scheduledTostring
senderIdentitystring
replyTostring
typestring (chamaileon | html | text)
excludeUnengagedboolean
webVersionEnabledboolean
trackOpensbooleanDefaults to true. When false, no open-tracking pixel is added to this email, so opens are not recorded (open stats and open-based segments/conditions get no data from it).
trackClicksbooleanDefaults to true. When false, links in this email are sent as-is instead of through the click tracker, so clicks are not recorded (click stats and click-based segments/conditions get no data from it).
feedsarray of object
feeds[].urlstringyes
feeds[].feedTypestring (rss-xml | json)yes"rss-xml" covers both RSS and Atom XML feeds - which one it actually is gets auto-detected from the feed content itself, which changes the array key inside the template (see variableName below).
feeds[].variableNamestringyesNo spaces allowed. This becomes a top-level Handlebars variable in the document (see the document field on the parent email for the templating syntax). The feed's parsed items are NOT directly at &#123;&#123;variableName&#125;&#125; - they're nested under a feed-shape-dependent array key you loop over with the custom each helper: - feedType "rss-xml" that turns out to be RSS: &#123;&#123;#each &lt;variableName&gt;.item&#125;&#125;...&#123;&#123;/each&#125;&#125; (array key is the literal word "item", singular) - feedType "rss-xml" that turns out to be Atom: &#123;&#123;#each &lt;variableName&gt;.entry&#125;&#125;...&#123;&#123;/each&#125;&#125; (array key is "entry") - feedType "json": the array key is whatever field the source JSON actually uses for its list (e.g. "items", "articles") - inspect the feed's JSON to find it, it is not fixed. Inside the loop, each item's own fields are whatever the feed provides (e.g. RSS gives &#123;&#123;this.title&#125;&#125;, &#123;&#123;this.link&#125;&#125;, &#123;&#123;this.pubDate&#125;&#125;) - there is no fixed schema, it mirrors the feed's actual content one-to-one.
feeds[].maxItemsintegerInformational only - NOT enforced when the email is sent. To actually limit how many items render, pass limit (and optionally skip) as hash arguments on the each tag itself, e.g. &#123;&#123;#each news.item limit=5 skip=0&#125;&#125;.
feeds[].requiredboolean
feeds[].availableFieldsarray of stringInformational only, for the app UI - not enforced or used when rendering.
errorMessagestring
createdAtstring
updatedAtstring

Delete a campaign ​

DELETE /v1/projectId/{projectId}/campaigns/{id}

Same 6-minute-before-send lock as PATCH applies to DELETE.

Parameters ​

NameInTypeRequiredDescription
projectIdpathstringyesThe project _id, found in the app under Project Settings.
idpathstringyes

Responses ​

StatusDescription
200Deleted
403Missing or invalid API key
404Campaigns not found

Response body ​

FieldTypeRequiredDescription
_idstring
namestring
statusstring (draft | archive | sent | scheduled | being-sent | error)
subjectstring
previewTextstring
timeZonestring
subscriberListIdstring
segmentIdstring
scheduledTostring
senderIdentitystring
replyTostring
typestring (chamaileon | html | text)
excludeUnengagedboolean
webVersionEnabledboolean
trackOpensbooleanDefaults to true. When false, no open-tracking pixel is added to this email, so opens are not recorded (open stats and open-based segments/conditions get no data from it).
trackClicksbooleanDefaults to true. When false, links in this email are sent as-is instead of through the click tracker, so clicks are not recorded (click stats and click-based segments/conditions get no data from it).
feedsarray of object
feeds[].urlstringyes
feeds[].feedTypestring (rss-xml | json)yes"rss-xml" covers both RSS and Atom XML feeds - which one it actually is gets auto-detected from the feed content itself, which changes the array key inside the template (see variableName below).
feeds[].variableNamestringyesNo spaces allowed. This becomes a top-level Handlebars variable in the document (see the document field on the parent email for the templating syntax). The feed's parsed items are NOT directly at &#123;&#123;variableName&#125;&#125; - they're nested under a feed-shape-dependent array key you loop over with the custom each helper: - feedType "rss-xml" that turns out to be RSS: &#123;&#123;#each &lt;variableName&gt;.item&#125;&#125;...&#123;&#123;/each&#125;&#125; (array key is the literal word "item", singular) - feedType "rss-xml" that turns out to be Atom: &#123;&#123;#each &lt;variableName&gt;.entry&#125;&#125;...&#123;&#123;/each&#125;&#125; (array key is "entry") - feedType "json": the array key is whatever field the source JSON actually uses for its list (e.g. "items", "articles") - inspect the feed's JSON to find it, it is not fixed. Inside the loop, each item's own fields are whatever the feed provides (e.g. RSS gives &#123;&#123;this.title&#125;&#125;, &#123;&#123;this.link&#125;&#125;, &#123;&#123;this.pubDate&#125;&#125;) - there is no fixed schema, it mirrors the feed's actual content one-to-one.
feeds[].maxItemsintegerInformational only - NOT enforced when the email is sent. To actually limit how many items render, pass limit (and optionally skip) as hash arguments on the each tag itself, e.g. &#123;&#123;#each news.item limit=5 skip=0&#125;&#125;.
feeds[].requiredboolean
feeds[].availableFieldsarray of stringInformational only, for the app UI - not enforced or used when rendering.
errorMessagestring
createdAtstring
updatedAtstring

Get stats for a single campaign ​

GET /v1/projectId/{projectId}/campaigns/{id}/stats

Aggregate counts only, never a per-recipient list - response size and query cost are bounded regardless of how much activity actually happened, since every count is a single indexed query scoped to this one resource. For the actual list of recipients (who received/opened/clicked/bounced/unsubscribed), see GET /v1/projectId/{projectId}/campaigns/{id}/recipients. Pass interval + metric for an hourly/daily/weekly/monthly breakdown instead of totals.

Parameters ​

NameInTypeRequiredDescription
projectIdpathstringyesThe project _id, found in the app under Project Settings.
idpathstringyesThe campaign _id.
fromquerystringOnly count events at or after this date/time.
toquerystringOnly count events at or before this date/time. If both from and to are given, the range between them cannot exceed 366 days.
intervalquerystringReturns an EmailStatsTimeline (per-period breakdown, same as the app's stats chart) instead of totals. Requires metric. With interval, from/to are rounded to whole UTC days and default to the last 7 days (hourly) or the last month (others). Max range: hourly 7 days, daily 60 days, weekly/monthly 12 months (405 when exceeded).
metricquerystringWith interval: what to count per period. subscribe/unsubscribe/resubscribe/pause-subscription/unpause-subscription count subscription changes caused by this email.
timeZonequerystringWith interval: IANA time zone the periods are labelled in. Defaults to UTC.

Responses ​

StatusDescription
200OK
400Invalid request body or query - every violation found (missing/invalid/unexpected fields) is reported in one response, semicolon-separated, not just the first one hit.
403Missing or invalid API key
404Campaigns not found
405The operation is blocked by a business rule (e.g. the resource is still in use)

Response body ​

The response is one of these shapes, depending on the request:

EmailStats ​

FieldTypeRequiredDescription
opensintegerTotal open events (a single recipient opening twice counts twice).
clicksintegerTotal click events.
uniqueOpensintegerNumber of distinct dispatched emails with at least one open.
uniqueClicksintegerNumber of distinct dispatched emails with at least one click.
sentinteger
failedinteger
bounceinteger
complaintinteger

EmailStatsTimeline ​

FieldTypeRequiredDescription
intervalstring (hourly | daily | weekly | monthly)
metricstring
timeZonestringThe time zone the periods are labelled in.
fromstringStart of the range actually used (start of the UTC day).
tostringEnd of the range actually used (end of the UTC day).
bucketsarray of objectOnly periods with activity are listed - missing periods had 0. When nothing happened at all, a single period with count 0 is returned.
buckets[].periodstring"YYYY-MM-DD HH:00" (hourly), "YYYY-MM-DD" (daily), "YYYY-MM-DD to YYYY-MM-DD" (weekly) or "YYYY-MM" (monthly).
buckets[].countintegerNot returned for the *PerUniqueOpens metrics.
buckets[].ratenumberCount metrics: the count as a percentage of all sends (null when nothing was sent). *PerUniqueOpens metrics: the percentage itself. Not returned for subscription metrics.

List recipients of a single campaign ​

GET /v1/projectId/{projectId}/campaigns/{id}/recipients

One row per actual recipient - who received it, how many times they opened/clicked, and whether they bounced/complained/unsubscribed/paused/subscribed/resubscribed as a result of this specific send. Supports the usual filter[<field>] exact-match filtering (e.g. filter[unsubscribed]=true, filter[status]=failed), plus two convenience filters not tied to a literal field: filter[opened]=true/false and filter[clicked]=true/false.

Parameters ​

NameInTypeRequiredDescription
projectIdpathstringyesThe project _id, found in the app under Project Settings.
idpathstringyesThe campaign _id.
limitqueryintegerMax items per page. Capped at 30.
skipqueryintegerNumber of items to skip, for pagination.
sortquerystringField to sort by.
orderquerystring
filter[&lt;field&gt;]querystringExact-match filter on a top-level field, e.g. filter[name]=Welcome. Repeatable for multiple fields.

Responses ​

StatusDescription
200OK
400Invalid request body or query - every violation found (missing/invalid/unexpected fields) is reported in one response, semicolon-separated, not just the first one hit.
403Missing or invalid API key
404Campaigns not found

Response body ​

FieldTypeRequiredDescription
itemsarray
countintegerTotal matching items across all pages, not just this page.
nextstringFull URL (path + query string) of the next page, or null if this is the last page.