Menu

List shared blocks

GET/v1/shared-blocks

Requires an API key with the templates:read scope. About keys and scopes

Any member. A shared block (a footer, a product card) is kept once and placed in emails as a shared block naming it. Templates and draft campaigns and journeys show its current content; scheduling or sending a campaign, activating a journey and publishing a template keep it as it was then. A placement with override shows its own blocks instead: the editor marks it edited and can push it back (update the shared block, then drop the override) or revert it (drop the override).

Query parameters

limitintegeroptional

min > 0 · max 100 · default 20

cursorstringoptional

1–2048 characters

Returns

Returns 200 OK with a list of SharedBlockListItem objects in data, and the next page's cursor in meta (see pagination). Otherwise returns an error; Errors lists every code and which to retry.

idstringrequired

uuid

namestringrequired
blocksEmailBlock[]required

At most 200 blocks across the entire tree and five levels including the root. Footer blocks must remain at root. Known child fields are validated recursively.

at least 1 item · at most 200 items

7 child attributes
idstringrequired

Identifies the block within the template; unique among its blocks.

1–128 characters

typestringrequired

The block type: header, heading, text, image, button, divider, spacer, columns, columns3, imagetext, imagegroup, boxed, quote, list, product, video, social, menu, html, section, footer, repeat, shared. Each type reads its own fields next to type; an unknown type is kept but not validated.

1–64 characters

styleEmailBlockStyleoptional

Visual overrides for this block, such as colours, font and spacing.

17 child attributes
backgroundColorstringoptional

Fill behind the block.

fontFamilystringoptional

A font every client has (Arial, Verdana, Georgia, Tahoma, Times New Roman, Courier New), or a web font, which shows where the client loads it and falls back to a safe font elsewhere.

one of Arial, Verdana, Georgia, Tahoma, Times New Roman, Courier New, Inter, Roboto, Open Sans, Lato, Montserrat, Poppins, DM Sans, Nunito, Work Sans, Oswald, Playfair Display, Merriweather, Lora, Libre Baskerville, EB Garamond

fontSizeintegeroptional

Text size in px, 12 to 72.

min 12 · max 72

mobileFontSizeintegeroptional

Text size in px on phones (screens up to 620px), 12 to 72.

min 12 · max 72

paddingobjectoptional

Space inside the block in px, 0 to 100 per side; omitted sides keep their default.

4 child attributes
topintegeroptional

min 0 · max 100

rightintegeroptional

min 0 · max 100

bottomintegeroptional

min 0 · max 100

leftintegeroptional

min 0 · max 100

borderWidthintegeroptional

Border thickness in px; 0 for none.

min 0 · max 10

borderStylestringoptional

Border line style.

one of solid, dashed, dotted

borderColorstringoptional

Border colour.

borderRadiusintegeroptional

Corner rounding in px, 0 to 100.

min 0 · max 100

textColorstringoptional

Text colour.

linkColorstringoptional

Colour of links in the text.

letterSpacingnumberoptional

Space between letters in px, such as 3 for a spaced-out eyebrow line.

min -2 · max 20

textTransformstringoptional

Set to uppercase to capitalise all text.

one of none, uppercase

lineHeightnumberoptional

A multiple of the font size.

min 1 · max 3

fontWeightstringoptional

Text weight.

one of regular, bold

fontStylestringoptional

Text style.

one of normal, italic

insetbooleanoptional

Draw the background and border as a box within the content width, not across the whole row.

visibleIfobjectoptional

Show the block only to contacts these segment rules match, checked as each message is rendered. Omit to show it to everyone. Not allowed on the footer.

One of 2 shapes
Match all
1 child attribute
allobject[]required

Every rule or nested group must match.

at least 1 item · at most 20 items

Match any
1 child attribute
anyobject[]required

At least one rule or nested group must match.

at least 1 item · at most 20 items

showOnstringoptional

Show the block only on phones (screens up to 620px) or only on wider screens. Clients that ignore screen size show the desktop version, and so does plain text. Omit to show it everywhere. Not allowed on the footer.

one of mobile, desktop

columnsobject[][]optional

Nested child block arrays: exactly two for columns, three for columns3. Each child follows this block contract. Omit to retain legacy text columns.

at most 3 items

blocksobject[]optional

A section's child blocks, drawn inside its box; or a repeat block's, written out once per item of its list, where {{ item.<field> }} reads that item. Repeats do not nest.

at most 200 items

createdAtstringrequired

date-time

updatedAtstringrequired

date-time

usageCountintegerrequired

How many templates, open campaigns and live journeys place it.

min 0 · max 9007199254740991