Skip to content

Update Newsletter Draft

Tool name: update-newsletter-draft

Writes name, internal note, subject, preheader, audience and UTM campaign name of an email newsletter draft. Nothing is sent and no send date is set. Only drafts can be written; omitted arguments keep their value, a call without any change is refused. Writing subject or preheader invalidates every contentRevision read before, so read the content again before changing it. The audience replaces the previous one entirely and is given with an explicit mode -- "all_contacts" addresses every active contact of the account. The body is changed by the block tools, delivery configuration and scheduling by their own tools. Refuses a split test: its subject lives on the variants, see update-newsletter-split-test-variant.

Input schema

newsletterIdinteger, >= 1required

ID of the newsletter to write, as returned by create-newsletter-draft

namenull or string, <= 250 characters

New name, unique within the account, at most 250 characters, without HTML; omit to keep

Default:null
notenull or string, <= 1000 characters

Internal note, at most 1000 characters, without HTML; omit to keep

Default:null
subjectnull or string, <= 998 characters

New subject line, without HTML. Invalidates every contentRevision read before

Default:null
audienceobject

Replaces the audience: "mode" is "all_contacts", "saved_audience" (with "audienceId") or "tag_conditions" (with the tag fields, at most 50 tags together); omit to keep

Default:null
preheadernull or string, <= 120 characters

New inbox preview line, at most 120 characters, without HTML; empty string removes it, omit keeps it. Invalidates every contentRevision read before

Default:null
utmCampaignNamenull or string, <= 120 characters

Campaign name appended to tracked links as utm_campaign, at most 120 characters, without HTML; empty string restores the account default, omit keeps it

Default:null
accountIdnull or integer, >= 1

User ID of the account; omit for the account the access token works in

Default:null
Input example
{ "newsletterId": 1, "name": null, "note": null, "subject": null, "audience": null, "preheader": null, "utmCampaignName": null, "accountId": null }

Output schema

accountIdintegerrequired
newsletterIdintegerrequired
emailIdintegerrequired
namestringrequired
newsletterStatusstringrequired
emailEditorstringrequired
subjectstringrequired
preheaderstringrequired
contentRevisionInvalidatedbooleanrequired
notesstringrequired
hasContentbooleanrequired
contentPublishedbooleanrequired
audienceobjectrequired
senderobjectrequired
editUrlstringrequired
contentUrlstringrequired
Output example
{ "accountId": 0, "newsletterId": 0, "emailId": 0, "name": "string", "newsletterStatus": "string", "emailEditor": "string", "subject": "string", "preheader": "string", "contentRevisionInvalidated": true, "notes": "string", "hasContent": true, "contentPublished": true, "audience": { "includeTags": [ { "id": 0, "name": "string" } ], "includeTagsMatch": "string", "excludeTags": [ { "id": 0, "name": "string" } ], "excludeTagsMatch": "string", "savedAudience": { "id": 0, "name": "string" }, "mode": "string" }, "sender": { "senderNameMode": "string", "senderName": "string", "senderEmailMode": "string", "senderEmail": "string", "replyToEmailMode": "string", "replyToEmail": "string", "senderDomainMode": "string", "senderDomain": "string", "signature": { "mode": "string", "id": 0, "name": "string" } }, "editUrl": "string", "contentUrl": "string" }