Skip to navigation

Update reusable block OAuth Scope: posts:write

Currently in beta

This feature is currently in beta and the API is subject to change.

Available on the Pro and Enterprise plans

This endpoint is available to workspaces on the Pro and Enterprise plans.

Update a reusable block. Only the fields you send change.

Sending blocks, body_content or header_image_url publishes the block, so every post, template and automation email using it picks up the change. Unpublished changes made to the block in the app are discarded, so only what you send goes live. Changing only the name, description or status does not publish the block.

Set status to archived to archive the block, or active to restore it. An archived block stops appearing in templates, automation emails and unsent posts, and cannot be added to new ones. Restoring a block lets it be added again; it does not return to the places it was removed from. Blocks that need a publication (advertisement, advertisement_logo, automated_advertisement_placement, embed_link, paywall_break, poll, programmatic_ads_logo and rss) and condition sets in visibility_settings are refused, and so is reusable_block: a reusable block can’t contain another one.

Requires an API key with access to every publication in the workspace.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

reusableBlockIdstringRequiredformat: "^(reusable_block_[0-9a-fA-F\-]+)$"
The prefixed ID of the reusable block object

Request

This endpoint expects an object.
namestringOptional
The name of the reusable block. Must be unique within the workspace.
descriptionstringOptional
The description of the reusable block.
blockslist of objectsOptional

The structured content of a body or footer block. Replaces the block’s content, and an empty list clears it. Cannot be combined with a non-empty body_content. Blocks that need a publication are refused; see the endpoint description. Not accepted on header blocks.

body_contentstringOptional

The content of a body or footer block, as a single raw HTML string. The HTML is wrapped in an htmlSnippet block internally. Note that <style> and <link> tags are removed during sanitization, so use inline styles for all visual styling. Replaces the block’s content, and an empty string clears it. Cannot be combined with non-empty blocks. Not accepted on header blocks.

header_image_urlstringOptional
The URL of an image to download and use as a header block's image. Only accepted on header blocks. An empty string removes the image, including one drawn from a publication field.
statusenumOptional

Set to archived to archive the block, or active to restore it.

Allowed values:

Response

OK
dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error