Skip to content

Write Email Block Style

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

Updates email block padding, alignment, device visibility and image corners, including mobile overrides. Applies to all selected blocks; omitted styles stay. Text typography uses update-email-editor-text-style; image display width is separate. Revision-bound, atomic edit; drafts only; 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

paddingTopnull or integer, [ 0 .. 400 ]

Space above the block, in pixels

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

Space right of the block, in pixels

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

Space below the block, in pixels

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

Space left of the block, in pixels

Default:null
textAlignnull or string

How its content sits: "left", "center", "right", or "justify" where the block is text

Default:null
Enum:"left""center""right""justify"
hideOnMobilenull or boolean

Whether the block is hidden on a phone

Default:null
hideOnDesktopnull or boolean

Whether the block is hidden on a desktop

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

How round the corners of an image are, in pixels; image only

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

Space above the block on a phone, in pixels

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

Space right of the block on a phone

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

Space below the block on a phone

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

Space left of the block on a phone

Default:null
mobileTextAlignnull or string

How its content sits on a phone

Default:null
Enum:"left""center""right""justify"
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" ], "paddingTop": null, "paddingRight": null, "paddingBottom": null, "paddingLeft": null, "textAlign": "left", "hideOnMobile": null, "hideOnDesktop": null, "borderRadius": null, "mobilePaddingTop": null, "mobilePaddingRight": null, "mobilePaddingBottom": null, "mobilePaddingLeft": null, "mobileTextAlign": "left", "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" }