- Apply Design To Email
Tool name: replace-email-editor-content-from-template
Puts one design from the KlickTipp template catalogue into the body of an email, addressed by its editor URL. Takes the id search-email-editor-templates returned, not the number beside it; the design itself is fetched from the catalogue on the call. Works for any email the editor opens -- a newsletter draft, an automation email, a notification email -- so starting a newsletter from a design is create-newsletter-draft followed by this. Replaces the stored draft entirely, without undo, and does not publish; use publish-newsletter-email-content. Bound to the contentRevision 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 to write, exactly as get-email-editor-content returned it
contentRevision of the read of that email; a stale one refuses the write
id of the design, as search-email-editor-templates returned it
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", "templateId": "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" }