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; by email ID or editor URL) 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. HTML is stored only as KlickTipp normalises it: no html, head, body or script, self-closed
, closed

and

  • ; a refusal names the place and the fix. 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

    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"
    emailIdnull or integer, >= 1

    ID of the email; omit when the editor URL is given

    Default:null
    editorUrlnull or string, [ 12 .. 500 ] characters

    Editor URL of the email, as get-email-editor-content returned it; omit when the email ID is given

    Default:null
    accountIdnull or integer, >= 1

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

    Default:null
    Input example
    { "contentRevision": "strings", "html": "string", "plain": null, "contentType": "html-and-plain", "emailId": null, "editorUrl": null, "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" ] }