- Import Email Content From A Document
Tool name: replace-email-editor-content-from-document
Stores a complete drag-and-drop editor document as the body of one KlickTipp email, addressed by its editor URL -- the entry path for a design that already exists as such a document, such as a template or an export. Takes the document as JSON, page-rooted or the page itself, in the shape get-email-editor-content hands one out. Nothing is converted, so nothing is lost; HTML goes through replace-email-editor-content-from-html, another email of the account through replace-email-editor-content-from-email. Replaces the stored draft entirely, without undo, and does not publish -- use publish-newsletter-email-content, named in nextAction. Bound to the content revision of the preceding read. An email that already has content is refused once with a list of what it holds; call again with replaceExistingContent true to write. Returns content status, new revision and editor URL.
Editor URL of the email, exactly as returned by get-email-editor-content
contentRevision of the read this document is based on; a stale one refuses the write
The complete editor document as JSON; replaces the stored one entirely
true to replace content the email already has; omit on the first attempt, so the answer lists what would be lost
{ "editorUrl": "stringstring", "contentRevision": "strings", "contentDocument": "string", "replaceExistingContent": null, "accountId": null }
"replaced": the stored document is a new one; "unchanged": nothing was persisted.
What this write created, with uuids: after "addRow" the row and its columns, after "addModule" the block, plus the contentRevision the next write needs. Empty when nothing was created.
{ "operation": "replaced", "previousContentStatus": "draft", "contentStatus": "draft", "emailId": 0, "contentRevision": "string", "warnings": [ "string" ], "editorUrl": "string", "created": [ { "operation": 0, "type": "row", "uuid": "string", "kind": "string", "columns": [ "string" ] } ], "nextAction": "review_and_publish_content" }