Skip to content

Get Email

Tool name: get-email-editor-content

Reads an email’s editor body by email ID or editor URL, with optional document, content outline, style outline or published HTML. The outlines include revision and block UUIDs for edits. Document projections require a drag-and-drop email; every projection is readable in any state, and writeBlockers names what keeps a write from running.

Input schema

emailIdnull or integer, >= 1

ID of the email; omit when the editor URL is given

Default:null
editorUrlnull or string, [ 12 .. 500 ] characters

Editor URL of the email, as a previous read returned it; omit when the email ID is given

Default:null
includeArray of strings, <= 4 items, unique

Projections to add: "content" (the editable document), "contentOutline" (uuid, kind and value of every writable field -- for a content change), "styleOutline" (what the style tools set -- for a style change), "publishedContent" (the HTML a dispatch would send); omit for identity only

Default:null
Items Enum:"content""contentOutline""styleOutline""publishedContent"
accountIdnull or integer, >= 1

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

Default:null
Input example
{ "emailId": null, "editorUrl": null, "include": null, "accountId": null }

Output schema

One of:
emailIdintegerrequired
usageTypestringrequired

What the email is used for; only these kinds are admitted, others are refused.

Enum:"newsletter""newsletter-split-test""autoresponder""autoresponder-split-test""automation""notification"
emailEditorstringrequired
Enum:"drag-and-drop""rich-text"
contentStatusstring or nullrequired

Null for an email of the previous rich-text editor, which has no editor state.

Enum:"draft""published""unpublished_changes"null
editorUrlstringrequired

Canonical editor URL every write of this body is addressed by.

contentobject
contentOutlineobject
styleOutlineobject
publishedContentobject
Output example
{ "emailId": 0, "usageType": "newsletter", "emailEditor": "drag-and-drop", "contentStatus": "draft", "editorUrl": "string", "content": { "emailId": 0, "contentStatus": "draft", "contentDocument": {}, "contentRevision": "string", "editorUrl": "string", "writeBlockers": [ "string" ], "importWarnings": [ "string" ], "variantLabel": "string", "variantIndex": 0 }, "contentOutline": { "emailId": 0, "contentStatus": "draft", "contentRevision": "string", "editorUrl": "string", "blockCount": 0, "rows": [ { "uuid": "string", "columns": [ { "uuid": "string", "modules": [ { "uuid": "string", "kind": "string", "content": { "property1": "string", "property2": "string" } } ] } ] } ] }, "styleOutline": { "emailId": 0, "contentStatus": "draft", "contentRevision": "string", "editorUrl": "string", "page": { "property1": "string", "property2": "string" }, "rows": [ { "uuid": "string", "style": { "property1": "string", "property2": "string" }, "columns": [ { "uuid": "string", "style": { "property1": "string", "property2": "string" }, "blocks": [ { "uuid": "string", "kind": "string", "style": { "property1": "string", "property2": "string" } } ] } ] } ] }, "publishedContent": { "emailId": 0, "contentStatus": "string", "contentHtml": "string", "plainContent": "string", "variantLabel": "string", "variantIndex": 0 } }