Update Email Campaign
Update the name or content of an email campaign (A/B version A). Edit content while the campaign is draft, or after Pause/Cancel Email Campaign. For A/B versions B, C, ... use Upsert A/B Variation.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your access token.
emails/ campaigns. writeOAuthPrivate IntegrationSub-Account TokenRequest
Headers
API Version
v3v3Path Parameters
Location ID
ve9EPM428h8vShlRW1KTCampaign ID
67f15c2ae99226d5bcccb8f3Body
Campaign name
Untitled campaign nameEditor content to update (A/B version A). Required only when updating campaign content, and must be provided together with editorType. An HTML or plain-text string for html/text, or design-editor JSON for builder (fetch the current JSON with Get Email Campaign includeContent=true). For versions B, C, ... use Upsert A/B Variation. Design-editor (builder) JSON. elements is the layout tree: mj-section > mj-column > leaf elements. Every node has a unique id and a tagName. attrs is a flat map keyed by node id (one entry for every node in the tree, sections and columns included): { tagName, content, attributes: [{ name, default, unit? }] }. content holds the text/HTML of leaf elements such as mj-text and mj-button. Each attribute is { name, default, unit? }: default is the value, and sizes are a number plus unit (px or %), e.g. { name: "font-size", default: 16, unit: "px" }. Padding is split into padding-top, padding-right, padding-bottom and padding-left with enable-padding set to true; the padding shorthand and inline style are not read by the editor. Send the full attribute set below for every element, changing only the values you need. When an element is selected in the editor, every listed attribute missing from the JSON is written in with the default shown here, so a partial list changes the design (background, padding, font) on first click. Text and image backgrounds use container-background-color; section and button backgrounds use background-color. Element attributes and the editor defaults: mj-section: enable-padding=true, padding-top=10px, padding-right=20px, padding-bottom=10px, padding-left=20px, background-color=#ffffff, background-url="", background-size=auto, background-repeat=repeat, full-width=false, text-align=center, border-radius=0px, border-width=0px, border-color="". mj-column: enable-padding=true, padding-top=0px, padding-right=0px, padding-bottom=0px, padding-left=0px, is-unstacked=false. mj-text: enable-padding=true, padding-top=12px, padding-right=24px, padding-bottom=12px, padding-left=24px, font-family=arial, helvetica, sans-serif, font-size=14px, line-height=1.5, container-background-color="". mj-image: enable-padding=true, padding-top=10px, padding-right=20px, padding-bottom=10px, padding-left=20px, src=https://..., alt="", href="", width=null, height=null, align=center, border-radius=0px, container-background-color="". mj-button: enable-padding=true, padding-top=10px, padding-right=20px, padding-bottom=10px, padding-left=20px, background-color=#00a4bd, color=#ffffff, font-family=Ubuntu, Helvetica, Arial, sans-serif, font-size=14px, align=center, border-radius=6px, border-width=0px, border-color=#00a4bd, redirectAction=url, url="". mj-divider: enable-padding=true, padding-top=10px, padding-right=20px, padding-bottom=10px, padding-left=20px, border-width=2px, border-color=#99acc2, border-style=solid, width=100%, align=center. mj-spacer: height=20px, container-background-color="". Buttons are mj-button elements (text in content, colors and link in attributes). mj-text content is edited as rich text and keeps only paragraphs, headings <h1>-<h6>, text-align, <span style> font/size/color, <strong>, <em>, <u>, <s>, links <a href>, lists and <br>; other markup (a link styled as a button with background or padding, tables, <div>, block styles) renders in the email but the editor drops it on edit, so the canvas shows something different from what is sent. Images: mj-image needs src set to a public https URL of the image (upload a file first with the Medias API and use its URL); without src the editor shows a placeholder. Set alt for accessibility and href to make the image a link. Leave width and height as null for the natural size (capped to the column) or set a number with unit: "px"; never omit them or send "". templateSettings holds template-wide theme settings as lists of { name, default, unit? } grouped by body (width, background-color, body-color, border, background image), button, divider, text (fonts, line-height, link styles) and header (customCss). To keep the current theme, send back the templateSettings that Get returned. Text fonts: inside mj-text content set font-family, font-size and color on a <span style="..."> around the text (e.g. <h1><span style="font-family: georgia, palatino, serif; font-size: 32px">Title</span></h1>); the editor toolbar reads fonts only from these spans, so styles on <h1>/<p> themselves show as the default font and size. Use one of these exact font-family values: arial, helvetica, sans-serif, helvetica, arial, sans-serif, verdana, geneva, sans-serif, georgia, palatino, serif, 'times new roman', times, serif, 'trebuchet ms', geneva, sans-serif, 'arial black', sans-serif, 'andale mono', monospace, Ubuntu, Helvetica, Arial, sans-serif. Google fonts: use 'Font Name', <fallback from the list above> (quotes only when the name has a space) and list every Google font used in templateSettings.text as { name: "custom-fonts", default: "Font One;Font Two" }; fonts not listed there are not loaded and fall back. Brand-board fonts: use 'Brand Font Name', <fallback> and list their brand font ids in { name: "brand-custom-fonts", default: "id1;id2" }. Keep both entries when sending back templateSettings. Supported leaf tags: mj-text, mj-image, mj-logo, mj-button, mj-divider, mj-spacer, mj-social, mj-video, mj-raw, mj-footer, mj-accordion, mj-carousel, mj-countdown-timer, mj-form, mj-product, mj-shopping-cart, mj-review-link, mj-rss-header, mj-rss-item, mj-preview-url. For tags not listed above, copy an existing element of that tag from a Get response. Buttons link through redirectAction (url, mail, telephone, sms, skype, other, file) plus the attribute it names, e.g. { name: "redirectAction", default: "url" } with { name: "url", default: "https://..." }; href alone renders no link. Nodes without an attrs entry are skipped when rendering. Merge fields are Handlebars: {{contact.first_name}}, a fallback is {{default contact.first_name "there"}}, a condition is {{#if contact.city}}...{{/if}}. Liquid filters such as {{contact.first_name | default: "there"}} are not supported and block the send.
<html><body>Hello World</body></html>Editor type for campaign content. Required only when updating campaign content, and must be provided together with editorContent. html = code editor (raw HTML string), text = plain-text email (string), builder = design (drag-and-drop) editor (JSON, see BuilderEditorContentPublicV2Dto). Merge fields are Handlebars: {{contact.first_name}}, a fallback is {{default contact.first_name "there"}}, a condition is {{#if contact.city}}...{{/if}}. Liquid filters such as {{contact.first_name | default: "there"}} are not supported and block the send.
htmlbuildertexthtmlContent writes must keep the email’s editor: sending html/text for a design-editor (builder) email, or builder for an HTML/text email, is refused with 409 (code 6017) so the design is not replaced by accident. Set true only to convert the email to the other editor on purpose. Switching between html and text is always allowed. Design JSON over an email last saved in Design Editor 2.0 is always refused (409, code 6018); edit it in the app, or convert it with html and allowEditorTypeChange: true.
falsefalseEmail subject saved on the campaign. Get, Preview, Validate and Test Send use it; Schedule Campaign emailMeta sets the subject that is sent. Send settings can change only while the campaign is draft, paused or cancelled (409 otherwise).
Your home called. It’s feeling festive.Sender display name saved on the draft (same rules as subject).
Anz StudioSender email address saved on the draft (same rules as subject). Use an address on a location sending domain (see List Sending Domains).
[email protected]Preview text (inbox snippet) saved on the draft (same rules as subject).
A little something for the holidaysID of the user performing this action
507f1f77bcf86cd799439011Response
Success
Campaign ID
67f15c2ae99226d5bcccb8f3Source of the campaign
email-campaignSource ID of the campaign
bulkRequest_abc123Campaign name
February NewsletterCampaign status. Status lifecycle: draft (created, editable) → Schedule Campaign → scheduled (waiting for sendAt or the next batch) → processing (sending) → sent. RSS campaigns have no scheduled state: while active, including between feed checks, they report processing or the status of their latest send. failed = sending errored. Pause Email Campaign: scheduled/processing → paused; Resume Email Campaign: paused → processing. Cancel Email Campaign: scheduled/processing/paused → cancelled. draft, paused and cancelled campaigns can be (re)scheduled with Schedule Campaign. archived = archived campaign (any underlying status).
allsentfailedarchiveddraftprocessingscheduledcancelledpausedsentCampaign type
bulk-emailCampaign category
email-campaignAB test variation identifiers (available only for AB test campaigns)
Whether the campaign is deleted
falseCreated at timestamp
2025-07-24T11:55:43.598ZLast updated timestamp
2026-02-09T04:49:12.322ZURL of the rendered campaign HTML after this write. Issue a GET against it to see the result; a new URL is issued on every content save.
https://firebasestorage.googleapis.com/v0/b/bucket/o/index.html?alt=media&token=abcTrace ID of request
019e4ef5-a65e-4198-8cf9-8e93dca9bda4