Skip to content

Get Email

Tool name: get-email-editor-content

Reads one email body by email ID or editor URL and says what the email is used for: email ID, usage type, editor, content state and the editor URL every write of the body takes. Everything else is a projection requested through "include": "content" (the editable document), "contentOutline" (uuid, kind and value of every writable field), "styleOutline" (what the style tools set) and "publishedContent" (the HTML a dispatch would send). The outlines carry the contentRevision a write has to give back. The newsletter around the email -- name, audience, dispatch state, split-test variants -- is get-newsletter. Reads only. The three document projections exist for the drag-and-drop editor and are answered whole or refused; publishedContent is readable in every state and editor.

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 four kinds are admitted, others are refused.

Enum:"newsletter""newsletter-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 } }