Skip to content

Write Email Button Look

Tool name: update-email-editor-button-style

Sets the look of buttons, several in one call: the colour behind the label, the colour of the label, how round the corners are, a border on any of the four sides, and the space between the label and the edge -- which is what makes a button large or small. Named values only -- no CSS. This is the button itself; the space AROUND it is update-email-editor-block-style, and the words are update-email-editor-button. 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.

Input schema

editorUrlstring, [ 12 .. 500 ] charactersrequired

Editor URL of the email, as the read returned it

contentRevisionstring, [ 7 .. 100 ] charactersrequired

The contentRevision of the read this change is based on

uuidsArray of strings, [ 1 .. 60 ] itemsrequired

The uuids of the blocks to write; the same values land on each

backgroundColornull or string^(#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3}|transparent)$

Colour behind the label, "#RRGGBB" or "transparent"

Default:null
textColornull or string^(#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3}|transparent)$

Colour of the label

Default:null
borderRadiusnull or integer, [ 0 .. 400 ]

How round the corners are, in pixels; 0 is a rectangle

Default:null
borderTopnull or string^(0|[1-9][0-9]{0,2})px (solid|dashed|dotted|n...

Border above, as "2px solid #000000"

Default:null
borderRightnull or string^(0|[1-9][0-9]{0,2})px (solid|dashed|dotted|n...

Border right, same shape

Default:null
borderBottomnull or string^(0|[1-9][0-9]{0,2})px (solid|dashed|dotted|n...

Border below, same shape

Default:null
borderLeftnull or string^(0|[1-9][0-9]{0,2})px (solid|dashed|dotted|n...

Border left, same shape

Default:null
paddingTopnull or integer, [ 0 .. 400 ]

Space above the label, in pixels

Default:null
paddingRightnull or integer, [ 0 .. 400 ]

Space right of the label

Default:null
paddingBottomnull or integer, [ 0 .. 400 ]

Space below the label

Default:null
paddingLeftnull or integer, [ 0 .. 400 ]

Space left of the label

Default:null
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", "uuids": [ "string" ], "backgroundColor": null, "textColor": null, "borderRadius": null, "borderTop": null, "borderRight": null, "borderBottom": null, "borderLeft": null, "paddingTop": null, "paddingRight": null, "paddingBottom": null, "paddingLeft": null, "accountId": null }

Output schema

One of:
operationstringrequired

"replaced": the stored document is a new one; "unchanged": nothing was persisted.

Enum:"replaced""unchanged"
previousContentStatusstringrequired
Enum:"draft""published""unpublished_changes"
contentStatusstringrequired
Enum:"draft""published""unpublished_changes"
emailIdintegerrequired
contentRevisionstringrequired
warningsArray of stringsrequired
editorUrlstringrequired
createdArray of objectsrequired

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.

nextActionstringrequired

The content action still open: "review_and_publish_content" while the stored draft is not the dispatch content.

Enum:"review_and_publish_content""none"
Output example
{ "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" }