Skip to content

Replace Rich-Text Email Content

Tool name: replace-email-editor-rich-text-content

Replaces a rich-text email’s entire body (newsletter, automation or notification) without undo or a publish step; the stored body is what dispatch sends. Requires a subject and the current contentRevision from get-email-editor-rich-text-content; unsupported HTML is refused. Plain text is retained only when the account maintains it, otherwise generated with a warning. Subject, sender and audience stay. Like the app, an email an active automation uses is written too. Drag-and-drop emails are refused.

Input schema

editorUrlstring, [ 12 .. 500 ] charactersrequired

Editor URL of the email, as get-email-editor-content returned it

contentRevisionstring, [ 7 .. 100 ] charactersrequired

contentRevision of the preceding get-email-editor-rich-text-content; a stale one refuses the write

htmlstring, <= 100000 charactersrequired

Complete HTML body, at most what a read hands back; pass an empty string only with contentType "plain-only"

plainnull or string, <= 100000 characters

Complete plain-text body, kept only if the account maintains plain text itself (else generated from the HTML, with a warning); omit to have KlickTipp generate it

Default:null
contentTypenull or string

"html-and-plain" or "plain-only"; omit to keep what the email uses

Default:null
Enum:"html-and-plain""plain-only"
accountIdnull or integer, >= 1

User ID of the account; omit for the account the access token works in

Default:null
Input example
{ "editorUrl": "stringstring", "contentRevision": "strings", "html": "string", "plain": null, "contentType": "html-and-plain", "accountId": null }

Output schema

operationstringrequired
Enum:"replaced""unchanged"
accountIdintegerrequired
emailIdintegerrequired
contentTypestringrequired
Enum:"html-and-plain""plain-only"
plainSourcestringrequired
Enum:"derived""custom"
contentRevisionstringrequired
editorUrlstringrequired

Names this email for the tools; not a link to open in KlickTipp. To show the email to a person, use contentUrl from get-newsletter.

warningsArray of stringsrequired
Output example
{ "operation": "replaced", "accountId": 0, "emailId": 0, "contentType": "html-and-plain", "plainSource": "derived", "contentRevision": "string", "editorUrl": "string", "warnings": [ "string" ] }