- Write Email Text
Tool name: update-email-editor-text
Writes the words of text blocks -- heading, text, paragraph, list and custom HTML -- each named by its uuid. The typography of a text block lives in its own markup, so the markup that was read for that block, with its wrapper div and its style attributes kept and only the words swapped, is what preserves it -- a bare
new text
throws the font size, line height and colours away. Several blocks in one call, and nothing else in the email is touched. Bound to the contentRevision of the read and refused whole if anything in it fails, so nothing half-written is stored. Drafts only. Saves the draft; publishing is publish-newsletter-email-content.The contentRevision of the read this change is based on
The blocks to write, each by uuid and its complete markup; a heading may add its level
{ "editorUrl": "stringstring", "contentRevision": "strings", "blocks": [ { "uuid": "string", "html": "string", "level": "h1" } ], "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" }