- 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.
Editor URL of the email, as a previous read returned it; omit when the email ID is given
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
{ "emailId": null, "editorUrl": null, "include": null, "accountId": null }
What the email is used for; only these four kinds are admitted, others are refused.
Null for an email of the previous rich-text editor, which has no editor state.
{ "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 } }