Create reusable block OAuth Scope: posts:write
Create reusable block OAuth Scope: posts:write
This feature is currently in beta and the API is subject to change.
This endpoint is available to workspaces on the Pro and Enterprise plans.
Create a reusable block that belongs to the workspace. The block is published at once, so every publication in the workspace can add it to its posts and templates.
Body and footer blocks take their content as blocks or body_content; without either they start with an empty paragraph. Header blocks take a header_image_url and otherwise start with the default header style. 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
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
The structured content of a body or footer block. 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.
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. Cannot be combined with non-empty blocks. Not accepted on header blocks.