Skip to content

Write Email Row Style

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

Writes the look of rows -- several in one call, the same values on each: the colour behind the whole band, the colour behind its content area, the default text colour, the width of the content, how the columns line up, whether the row stacks or is hidden, its padding, and a border on any of its four sides. A frame around a row is a border on the row, not on its columns: one border per column draws a box per column, with seams. Named values only -- no CSS -- so a colour is "#RRGGBB" or "transparent", a width or padding is a number of pixels, and a border is "1px solid #000000". Everything not named stays as it is. 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 rows 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 whole row, "#RRGGBB" or "transparent"

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

Colour behind the content area inside the row

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

Default text colour of the row

Default:null
contentWidthnull or integer, [ 320 .. 1440 ]

Width of the content area in pixels

Default:null
verticalAlignnull or string

How the columns line up: "top", "middle" or "bottom"

Default:null
Enum:"top""middle""bottom"
stackOnMobilenull or boolean

Whether the columns stack under each other on a phone

Default:null
hideOnMobilenull or boolean

Whether the row is hidden on a phone

Default:null
hideOnDesktopnull or boolean

Whether the row is hidden on a desktop

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

Space above the content of the row, in pixels

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

Space right of the content of the row, in pixels

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

Space below the content of the row, in pixels

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

Space left of the content of the row, in pixels

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

Border above the row, as "1px solid #000000"

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

Border right of the row, same shape

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

Border below the row, same shape

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

Border left of the row, same shape

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, "contentBackgroundColor": null, "textColor": null, "contentWidth": null, "verticalAlign": "top", "stackOnMobile": null, "hideOnMobile": null, "hideOnDesktop": null, "paddingTop": null, "paddingRight": null, "paddingBottom": null, "paddingLeft": null, "borderTop": null, "borderRight": null, "borderBottom": null, "borderLeft": 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" }