> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.beehiiv.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.beehiiv.com/_mcp/server.

# Create post <Badge intent="info" minimal outlined>OAuth Scope: posts:write</Badge>

POST https://api.beehiiv.com/v2/publications/{publicationId}/posts
Content-Type: application/json

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

Create a post for a specific publication. For a detailed walkthrough including setup, testing workflows, and working with custom HTML and templates, see the Using the Send API and Create Post Endpoint guide.

## Asynchronous creation

Post creation is processed in the background. This endpoint returns `201` immediately with the post's `id`, but the post is not finished being created at that moment. The returned `id` is stable — it is the same id the post will have once creation completes.

If you fetch the post (`GET /publications/{publicationId}/posts/{postId}`) right away, it may not exist yet. In that case the fetch returns `202` (still being created) — wait briefly and retry, honoring the `Retry-After` header. If background creation fails, the fetch returns `404` with the error code `POST_CREATION_FAILED`, so you should stop retrying, verify your request, and try creating the post again.

## Content methods

There are three ways to provide content for a post. You must provide either `blocks` or `body_content`, but not both.

### 1. Blocks

Use the `blocks` field to build your post with structured content blocks such as paragraphs, images, headings, buttons, tables, and more. Each block has a `type` and its own set of properties. This method gives you fine-grained control over individual content elements and supports features like visual settings, visibility settings, and dynamic content targeting.

### 2. Raw HTML (`body_content`)

Use the `body_content` field to provide a single string of raw HTML. The HTML is wrapped in an `htmlSnippet` block internally. This is useful when you have pre-built HTML content or are migrating from another platform.

### 3. HTML blocks within blocks

Use `type: html` blocks inside the `blocks` array to embed raw HTML snippets alongside other structured blocks. This lets you mix structured content (paragraphs, images, etc.) with custom HTML where needed.

## CSS and styling guardrails

beehiiv processes all HTML content through a sanitization pipeline. When using `body_content` or `html` blocks, be aware of the following:

* **`<style>` tags are removed.** All `<style>` block elements are stripped during sanitization. Do not rely on embedded stylesheets.
* **`<link>` tags are removed.** External stylesheet references are not allowed.
* **Inline styles are preserved.** Styles applied directly to elements via the `style` attribute (e.g., `<div style="color: red;">`) are kept intact.
* **CSS classes have no effect.** While class attributes are not stripped, no corresponding stylesheets are loaded to apply them.
* **beehiiv's email template wraps your content.** Your HTML is rendered inside beehiiv's email table structure, which applies its own layout and spacing. This may affect the appearance of your content.
* **Use inline styles for all visual styling.** Since `<style>` and `<link>` tags are removed, inline styles on individual elements are the only reliable way to control appearance.

Reference: https://developers.beehiiv.com/api-reference/posts/create

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `publicationId` (string, required) — The prefixed ID of the publication object

### Body (application/json)

This endpoint expects an object.

- `title` (string, required) — The title of the post.
- `blocks` (list of Block, optional) — The structured content blocks that make up the post. Supports block types such as paragraph, image, heading, button, html, table, list, columns, and more. You can embed raw HTML snippets within blocks using the `html` block type. Either this field OR the `body_content` field must be provided.
- `body_content` (string, optional) — The content of the post 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 — use inline styles for all visual styling. Either this field OR the `blocks` field must be provided.
- `subtitle` (string, optional) — The subtitle of the post.
- `post_template_id` (string, optional) — The ID of the template to use for the post. If not provided, the default template will be used.
- `status` (enum, optional, default: draft) — The status of the post. If not provided, the default (`draft`) value will be used and the post will not be scheduled or published. Explicitly pass `confirmed` to have the post publish immediately (if no `scheduled_at` is provided) or at the `scheduled_at` time.
  - Allowed values: `draft`, `confirmed`
- `scheduled_at` (datetime, optional) — The time in which the post will be published. If not provided, the post will be published immediately unless `status` is set to `draft`. A draft post cannot be scheduled.
- `custom_link_tracking_enabled` (boolean, optional) — If true, custom link tracking will be enabled for this post. If not provided, the default value will be used.
- `email_capture_type_override` (enum, optional) — The email capture type to use for this post. If not provided, the default value will be used.
  - Allowed values: `none`, `gated`, `popup`
- `override_scheduled_at` (datetime, optional) — If you wish to display a date other than the scheduled_at date in the email, you can provide a date here. This will not affect the actual publish date of the post.
- `social_share` (enum, optional) — The social share type to use for this post. If not provided, the default value will be used.
  - Allowed values: `comments_and_likes_only`, `with_comments_and_likes`, `top`, `none`
- `thumbnail_image_url` (string, optional) — The URL of the thumbnail image to use for the post. If not provided, the default value will be used.
- `recipients` (PostRecipients, optional) — The recipients to use for this post. If not provided, the default value will be used.
- `email_settings` (PostEmailSettings, optional) — The email settings to use for this post. If not provided, the default value will be used.
- `web_settings` (PostWebSettings, optional) — The web settings to use for this post. If not provided, the default value will be used.
- `seo_settings` (PostMetadata, optional) — The metadata to use for this post. If not provided, the default value will be used.
- `content_tags` (list of string, optional) — The content tags to use for this post. If not provided, the default value will be used.
- `guest_author_ids` (list of string, optional) — The prefixed IDs of the guest authors to associate with this post. Guest authors must belong to the publication. Obtain IDs from the List Authors endpoint. When provided, replaces all existing guest authors on the post.
- `team_author_ids` (list of string, optional) — The prefixed IDs of the team members to associate with this post as authors. Team authors must have access to the publication. Note the List Authors endpoint only returns team members who already have a byline on a published post in this publication, so it will not surface IDs for a team member's first assignment. When provided, replaces all existing team authors on the post.
- `headers` (map from string to string, optional) — Custom email headers for this post. Merges with newsletter list and publication headers at send time, with this post's values winning on a key collision. Set a value to `null` to suppress a header inherited from the newsletter list or publication. System-managed headers (e.g. List-Unsubscribe, X-SMTPAPI) cannot be overridden.
- `header_custom_css` (string, optional) — Additional custom CSS added to this post's email `<head>`. Use this for styles, since `<style>` tags in `body_content` are removed. Applies to email only, not the web version. This replaces any custom CSS from the template the post is built from, while an empty string keeps the template's CSS.
- `utm_source` (string, optional) — The utm_source appended to links in this post. Falls back to the newsletter list, then the publication, then a generated default.
- `utm_medium` (string, optional) — The utm_medium appended to links in this post. Falls back to the newsletter list, then the publication, then a generated default.
- `utm_campaign` (string, optional) — The utm_campaign appended to links in this post. Falls back to the newsletter list, then the publication, then a generated default.
- `utm_params_enabled` (boolean, optional) — Whether UTM parameters are appended to links in this post. Omit to inherit from the newsletter list, then the publication.
- `custom_fields` (map from string to string, optional) — The custom fields to use for this post. If not provided, the default value will be used.
- `newsletter_list_id` (string, optional) — The prefixed ID of the newsletter list to associate with this post. When provided, the post will only be sent to subscribers of this list.

## Response

### 201

Created

- `data` (PostCreate, required)

## Errors

### 400 Bad Request Error

Bad Request

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 401 Unauthorized Error

Unauthorized. The API key or OAuth access token is missing, invalid, or expired.

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 403 Forbidden Error

Forbidden

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 404 Not Found Error

Resource Not Found

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 429 Too Many Requests Error

Rate Limit Exceeded

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

### 500 Internal Server Error

Internal Server Error

- `status` (integer, required)
- `statusText` (string, required)
- `errors` (list of ErrorDetail, required)

## Types

### Block

A block in the post content.

- `type`: `paragraph`
  - `formattedText` (list of ParagraphBlockTextSection, optional) — The formatted content of the paragraph.
  - `plaintext` (string, optional) — The plaintext content of the paragraph.
  - `textAlign` (enum, optional) — Legacy paragraph alignment field. Use `textAlignment` for new integrations.
    - Allowed values: `left`, `center`, `right`
  - `textAlignment` (enum, optional) — The text alignment of the paragraph (e.g., left, center, right).
    - Allowed values: `left`, `center`, `right`
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `image`
  - `imageUrl` (string, required) — The URL of the image.
  - `alt_text` (string, optional) — Alternative text for the image.
  - `caption` (string, optional) — A caption for the image.
  - `captionAlignment` (enum, optional) — The text alignment of the caption.
    - Allowed values: `left`, `center`, `right`
  - `imageAlignment` (enum, optional) — The text alignment of the image.
    - Allowed values: `left`, `center`, `right`
  - `title` (string, optional) — The title of the image.
  - `url` (string, optional) — The URL that the image should link to.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
  - `width` (integer, optional) — The width of the image. Should be between 1 and 100.
- `type`: `button`
  - `href` (string, required) — The URL the button should use.
  - `text` (string, required) — The text content of the button.
  - `alignment` (enum, optional) — The text alignment of the button.
    - Allowed values: `left`, `center`, `right`
  - `size` (enum, optional) — The size of the button (e.g., small, normal, large).
    - Allowed values: `small`, `normal`, `large`
  - `target` (string, optional) — The target of the button (e.g., _blank).
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `heading`
  - `level` (enum, required) — The level of the header (e.g., 1, 2, 3, etc.).
    - Allowed values: `1`, `2`, `3`, `4`, `5`, `6`
  - `anchorHeader` (boolean, optional, default: true) — Whether the header should be an anchor header.
  - `anchorIncludeInToc` (boolean, optional, default: true) — Whether the header should be included in the table of contents.
  - `formattedText` (list of ParagraphBlockTextSection, optional) — The formatted content of the header, supporting links and inline styling.
  - `text` (string, optional) — The text content of the header. Ignored if `formattedText` is provided.
  - `textAlignment` (enum, optional) — The text alignment of the header (e.g., left, center, right).
    - Allowed values: `left`, `center`, `right`
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `rss`
  - `articleLayout` (enum, optional) — The layout of the articles from the feed.
    - Allowed values: `1-col`, `2-col`, `3-col`, `4-col`
  - `articlesToShow` (integer, optional) — The number of articles to show from the feed.
  - `ctaAlignment` (enum, optional) — The alignment of the call to action.
    - Allowed values: `Left`, `Center`, `Right`
  - `ctaStyle` (enum, optional) — The style of the call to action.
    - Allowed values: `CTA button`, `CTA link`, `Title as link`, `Thumbnail as link`, `Title and thumbnail as link`
  - `ctaText` (string, optional) — The text of the call to action. Applicable if ctaStyle is button or link.
  - `externalRssFeedId` (string, optional) — The ID of the external RSS feed.
  - `refreshOnSend` (boolean, optional) — Whether or not to refresh the contents from the RSS feed before sending out the email.
  - `rssFeedUrl` (string, optional) — The URL of the RSS feed.
  - `selectionMode` (enum, optional) — How to select feed articles, by count or time window.
    - Allowed values: `count`, `time`
  - `showArticleThumbnail` (boolean, optional) — Whether to show the article thumbnail.
  - `showArticleTitle` (boolean, optional) — Whether to show the article title.
  - `showAuthor` (boolean, optional) — Whether to show the author.
  - `showCategories` (boolean, optional) — Whether to show the categories.
  - `showContent` (boolean, optional) — Whether to show the article content.
  - `showCta` (boolean, optional) — Whether to show a call to action.
  - `showDescription` (boolean, optional) — Whether to show the article description.
  - `showPublishedDate` (boolean, optional) — Whether to show the date the article was published
  - `thumbnailPosition` (enum, optional) — The position of the thumbnail.
    - Allowed values: `Above Title`, `Below Title`, `Left of content`, `Right of content`, `Alternating Horizontally`
  - `timeWindowHours` (integer, optional) — Trailing window in hours when selectionMode is time.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `advertisement`
  - `opportunity_id` (string, required) — The ID of the Advertisement opportunity.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `advertisement_logo`
  - `opportunity_id` (string, required) — The ID of the advertisement opportunity whose logo to display.
  - `override_sponsor_text` (enum, required) — The sponsor text to display with the advertisement logo. Required.
    - Allowed values: `sponsored_by`, `together_with`, `in_partnership_with`, `presented_by`, `todays_sponsor`
  - `override_align` (enum, optional) — The logo alignment. Defaults to center.
    - Allowed values: `left`, `center`, `right`
  - `override_width` (integer, optional) — The logo width as a percentage. Must be greater than 0. Defaults to 100.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `automated_advertisement_placement`
  - `advertisement_kind` (enum, required) — The automated advertisement kind to fill at publish time.
    - Allowed values: `primary`, `secondary`, `tertiary`
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `programmatic_ads_logo`
  - `override_sponsor_text` (enum, required) — The sponsor text to display with the advertisement logo. Required.
    - Allowed values: `sponsored_by`, `together_with`, `in_partnership_with`, `presented_by`, `todays_sponsor`
  - `override_align` (enum, optional) — The logo alignment. Defaults to center.
    - Allowed values: `left`, `center`, `right`
  - `override_width` (integer, optional) — The logo width as a percentage. Must be greater than 0. Defaults to 100.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `columns`
  - `columns` (list of ColumnBlock, required) — The blocks that make up the columns.
  - `stackOnMobile` (boolean, optional, default: true) — Whether columns should stack vertically on mobile devices.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `list`
  - `items` (list of ListBlockItem, required) — The items in the list.
  - `listType` (enum, optional) — The type of list (e.g., ordered, unordered).
    - Allowed values: `ordered`, `unordered`
  - `startNumber` (integer, optional) — The number to start the list at. Only applicable if listType is ordered.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `table`
  - `rows` (list of list of TableCellData, required) — The rows of the table.
  - `headerColumn` (boolean, optional, default: false) — Whether the first column is a header column.
  - `headerRow` (boolean, optional, default: true) — Whether the first row is a header row.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `html`
  - `html` (string, required) — The raw HTML content. Note that `<style>` and `<link>` tags are removed during sanitization — use inline styles for all visual styling.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `embed_link`
  - `url` (string, required) — The URL of the embed link.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `poll`
  - `poll_id` (string, required) — The ID of the poll you wish to include.
  - `show_options_initially` (boolean, optional) — Whether to show the poll options initially. Defaults to false.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `quote`
  - `quote` (string, required) — The text of the quote.
  - `alignment` (enum, optional) — The text alignment of the quote. Defaults depend on the variant.
    - Allowed values: `left`, `center`, `right`
  - `author` (string, optional) — The author of the quote.
  - `variant` (enum, optional) — The type of quote block. Defaults to "block".
    - Allowed values: `block`, `inline`, `quotation`
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `content_break`
- `type`: `paywall_break`
  - `paywall_id` (string, required) — The ID of the paywall.
- `type`: `section`
  - `blocks` (list of SectionableBlock, required) — The blocks to group inside this section. Must contain at least one block. Cannot contain `section` or `columns` blocks.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this section is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling applied to the section as a whole (background color, padding, borders, etc.).

### PostRecipients

Controls who receives the post. If omitted entirely, defaults to free tier only on both web and email. If a channel key (web or email) is provided but empty, no targets are created for that channel — omit the key to skip a channel.

- `web` (PostWebRecipients, required) — Web audience targeting. Omit this key to create no web targets.
- `email` (PostEmailRecipients, required) — Email audience targeting. Omit this key to create no email targets.

### PostEmailSettings

- `from_address` (string, optional)
- `custom_live_url` (string, optional)
- `display_title_in_email` (boolean, optional)
- `display_byline_in_email` (boolean, optional)
- `display_subtitle_in_email` (boolean, optional)
- `email_header_engagement_buttons` (string, optional)
- `email_header_social_share` (string, optional)
- `email_preview_text` (string, optional)
- `email_subject_line` (string, optional)
- `reply_to_address` (string, optional) — Email address to set as Reply-To. Must be a verified reply-to address owned by the publication. Returns 422 if not found.
- `sender_name` (string, optional) — The sender name preset, expressed as a composition key: either a single token, or `<token>|<connector>|<token>`. Tokens are `brand`, `list`, `authors_first` and `authors_full`; connectors are `from`, `with`, `by`, `at`, `comma`, `colon` and `space`. For a post by Jane Doe on the publication Bee Informed, `authors_first|from|brand` renders as "Jane from Bee Informed". The `list` token only resolves when the post is associated with a newsletter list. Pass `null` to clear the override and inherit from the newsletter list or publication.

### PostWebSettings

- `display_subtitle_on_web` (boolean, optional)
- `display_thumbnail_on_web` (boolean, optional)
- `display_title_on_web` (boolean, optional)
- `hide_from_feed` (boolean, optional)
- `paywall_break_price_id` (string, optional) — The prefixed ID of the price.
- `paywall_id` (string, optional) — The prefixed ID of the paywall.
- `slug` (string, optional)

### PostMetadata

- `default_description` (string, optional)
- `default_title` (string, optional)
- `og_description` (string, optional)
- `og_title` (string, optional)
- `twitter_description` (string, optional)
- `twitter_title` (string, optional)

### PostCreate

- `id` (string, required) — The prefixed post id
- `preview_url` (string, optional) — A stable URL to the post's email preview in the beehiiv app. Renders the current post content on every visit. Requires a beehiiv session with access to the publication. The same URL is returned on every create, update, or show. Supports optional query parameters to preview as a specific audience: `platform` (`email` default, or `web`), `subscriber_type` (`free` default, or `premium` - requires `tier_ids[]`), `tier_ids[]` (one or more tier ids, only used when `subscriber_type=premium`), and `subscriber_id` (renders using that subscriber's real tier memberships and takes precedence over `subscriber_type`/`tier_ids[]`).

### ErrorDetail

- `message` (string, required)
- `code` (string, required)

### ParagraphBlockTextSection

- `text` (string, required) — The text content of the paragraph.
- `styling` (list of enum, optional) — The inline styles for the text.
  - Allowed values: `bold`, `italic`, `underline`, `strikethrough`
- `text_color` (string, optional) — The CSS color value for the text.
- `highlight_color` (string, optional) — The CSS color value for the text highlight.
- `link` (Link, optional) — The link of the text.

### VisibilitySettings

- `show_on_web` (boolean, optional) — Whether to show the block on the web.
- `show_on_email` (boolean, optional) — Whether to show the block on the email.
- `show_to_anonymous_users_web` (boolean, optional) — Whether to show the block to anonymous users on the web.
- `show_to_free_subscribers` (boolean, optional) — Whether to show the block to free subscribers.
- `show_to_paid_subscribers` (boolean, optional) — Whether to show the block to paid subscribers.
- `show_to_subscribers_with_referral_value` (integer, optional) — The exact referral count required to show the block to subscribers.
- `show_to_subscribers_with_referral_condition` (enum, optional) — The condition required to show the block to subscribers.
  - Allowed values: `eq`, `gt`, `lt`
- `condition_set_ids` (list of string, optional) — An optional list of condition set UUIDs to gate this block behind dynamic content targeting. When provided, only subscribers matching the specified condition sets will see this block. Condition sets must belong to the same publication and be active.
- `condition_set_operator` (enum, optional) — Instructs how to combine multiple condition sets. Defaults to "or" (subscriber can match any condition). Use "and" to show the block if the subscriber meets all conditions.
  - Allowed values: `and`, `or`

### VisualSettings

- `background_color` (string, optional) — The background color of the block.
- `text_color` (string, optional) — The text color of the block.
- `border_color` (string, optional) — The border color of the block.
- `border_style` (enum, optional) — The border style of the block.
  - Allowed values: `solid`, `dashed`, `dotted`
- `border_width` (integer, optional) — The border width of the block.
- `border_width_top` (integer, optional) — The border width of the top of the block.
- `border_width_bottom` (integer, optional) — The border width of the bottom of the block.
- `border_width_left` (integer, optional) — The border width of the left of the block.
- `border_width_right` (integer, optional) — The border width of the right of the block.
- `border_radius` (integer, optional) — The border radius of the block.
- `border_radius_top_left` (integer, optional) — The border radius of the top left of the block.
- `border_radius_top_right` (integer, optional) — The border radius of the top right of the block.
- `border_radius_bottom_left` (integer, optional) — The border radius of the bottom left of the block.
- `border_radius_bottom_right` (integer, optional) — The border radius of the bottom right of the block.
- `inner_spacing` (integer, optional) — The inner spacing of the block.
- `inner_spacing_top` (integer, optional) — The inner spacing of the top of the block.
- `inner_spacing_bottom` (integer, optional) — The inner spacing of the bottom of the block.
- `inner_spacing_left` (integer, optional) — The inner spacing of the left of the block.
- `inner_spacing_right` (integer, optional) — The inner spacing of the right of the block.
- `outer_spacing` (integer, optional) — The outer spacing of the block.
- `outer_spacing_top` (integer, optional) — The outer spacing of the top of the block.
- `outer_spacing_bottom` (integer, optional) — The outer spacing of the bottom of the block.
- `outer_spacing_left` (integer, optional) — The outer spacing of the left of the block.
- `outer_spacing_right` (integer, optional) — The outer spacing of the right of the block.

### ColumnBlock

- `blocks` (list of EmbeddableBlocks, required) — The blocks that make up the column.
- `position` (enum, optional) — The column position. This field is deprecated but supported for existing column layouts.
  - Allowed values: `left`, `right`
- `width` (integer, optional) — The column width percentage. When omitted, width is calculated automatically.
- `verticalAlign` (enum, optional) — The vertical alignment of the column content.
  - Allowed values: `top`, `middle`, `bottom`

### ListBlockItem

A list item as either plain text or formatted text data.

- string
- List Block Item Data: ListBlockItemData

### TableCellData

- `text` (string, optional) — The text content of the cell.
- `formattedText` (list of ParagraphBlockTextSection, optional) — The formatted content of the cell.
- `alignment` (enum, optional) — The text alignment of the cell.
  - Allowed values: `left`, `center`, `right`
- `colspan` (integer, optional, default: 1) — The number of columns the cell spans.
- `rowspan` (integer, optional, default: 1) — The number of rows the cell spans.

### SectionableBlock

A block that can appear inside a section. Excludes `section` and `columns` (TipTap's schema does not allow nested sections).

- `type`: `paragraph`
  - `formattedText` (list of ParagraphBlockTextSection, optional) — The formatted content of the paragraph.
  - `plaintext` (string, optional) — The plaintext content of the paragraph.
  - `textAlign` (enum, optional) — Legacy paragraph alignment field. Use `textAlignment` for new integrations.
    - Allowed values: `left`, `center`, `right`
  - `textAlignment` (enum, optional) — The text alignment of the paragraph (e.g., left, center, right).
    - Allowed values: `left`, `center`, `right`
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `image`
  - `imageUrl` (string, required) — The URL of the image.
  - `alt_text` (string, optional) — Alternative text for the image.
  - `caption` (string, optional) — A caption for the image.
  - `captionAlignment` (enum, optional) — The text alignment of the caption.
    - Allowed values: `left`, `center`, `right`
  - `imageAlignment` (enum, optional) — The text alignment of the image.
    - Allowed values: `left`, `center`, `right`
  - `title` (string, optional) — The title of the image.
  - `url` (string, optional) — The URL that the image should link to.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
  - `width` (integer, optional) — The width of the image. Should be between 1 and 100.
- `type`: `button`
  - `href` (string, required) — The URL the button should use.
  - `text` (string, required) — The text content of the button.
  - `alignment` (enum, optional) — The text alignment of the button.
    - Allowed values: `left`, `center`, `right`
  - `size` (enum, optional) — The size of the button (e.g., small, normal, large).
    - Allowed values: `small`, `normal`, `large`
  - `target` (string, optional) — The target of the button (e.g., _blank).
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `heading`
  - `level` (enum, required) — The level of the header (e.g., 1, 2, 3, etc.).
    - Allowed values: `1`, `2`, `3`, `4`, `5`, `6`
  - `anchorHeader` (boolean, optional, default: true) — Whether the header should be an anchor header.
  - `anchorIncludeInToc` (boolean, optional, default: true) — Whether the header should be included in the table of contents.
  - `formattedText` (list of ParagraphBlockTextSection, optional) — The formatted content of the header, supporting links and inline styling.
  - `text` (string, optional) — The text content of the header. Ignored if `formattedText` is provided.
  - `textAlignment` (enum, optional) — The text alignment of the header (e.g., left, center, right).
    - Allowed values: `left`, `center`, `right`
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `rss`
  - `articleLayout` (enum, optional) — The layout of the articles from the feed.
    - Allowed values: `1-col`, `2-col`, `3-col`, `4-col`
  - `articlesToShow` (integer, optional) — The number of articles to show from the feed.
  - `ctaAlignment` (enum, optional) — The alignment of the call to action.
    - Allowed values: `Left`, `Center`, `Right`
  - `ctaStyle` (enum, optional) — The style of the call to action.
    - Allowed values: `CTA button`, `CTA link`, `Title as link`, `Thumbnail as link`, `Title and thumbnail as link`
  - `ctaText` (string, optional) — The text of the call to action. Applicable if ctaStyle is button or link.
  - `externalRssFeedId` (string, optional) — The ID of the external RSS feed.
  - `refreshOnSend` (boolean, optional) — Whether or not to refresh the contents from the RSS feed before sending out the email.
  - `rssFeedUrl` (string, optional) — The URL of the RSS feed.
  - `selectionMode` (enum, optional) — How to select feed articles, by count or time window.
    - Allowed values: `count`, `time`
  - `showArticleThumbnail` (boolean, optional) — Whether to show the article thumbnail.
  - `showArticleTitle` (boolean, optional) — Whether to show the article title.
  - `showAuthor` (boolean, optional) — Whether to show the author.
  - `showCategories` (boolean, optional) — Whether to show the categories.
  - `showContent` (boolean, optional) — Whether to show the article content.
  - `showCta` (boolean, optional) — Whether to show a call to action.
  - `showDescription` (boolean, optional) — Whether to show the article description.
  - `showPublishedDate` (boolean, optional) — Whether to show the date the article was published
  - `thumbnailPosition` (enum, optional) — The position of the thumbnail.
    - Allowed values: `Above Title`, `Below Title`, `Left of content`, `Right of content`, `Alternating Horizontally`
  - `timeWindowHours` (integer, optional) — Trailing window in hours when selectionMode is time.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `advertisement`
  - `opportunity_id` (string, required) — The ID of the Advertisement opportunity.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `advertisement_logo`
  - `opportunity_id` (string, required) — The ID of the advertisement opportunity whose logo to display.
  - `override_sponsor_text` (enum, required) — The sponsor text to display with the advertisement logo. Required.
    - Allowed values: `sponsored_by`, `together_with`, `in_partnership_with`, `presented_by`, `todays_sponsor`
  - `override_align` (enum, optional) — The logo alignment. Defaults to center.
    - Allowed values: `left`, `center`, `right`
  - `override_width` (integer, optional) — The logo width as a percentage. Must be greater than 0. Defaults to 100.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `list`
  - `items` (list of ListBlockItem, required) — The items in the list.
  - `listType` (enum, optional) — The type of list (e.g., ordered, unordered).
    - Allowed values: `ordered`, `unordered`
  - `startNumber` (integer, optional) — The number to start the list at. Only applicable if listType is ordered.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `table`
  - `rows` (list of list of TableCellData, required) — The rows of the table.
  - `headerColumn` (boolean, optional, default: false) — Whether the first column is a header column.
  - `headerRow` (boolean, optional, default: true) — Whether the first row is a header row.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `html`
  - `html` (string, required) — The raw HTML content. Note that `<style>` and `<link>` tags are removed during sanitization — use inline styles for all visual styling.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `embed_link`
  - `url` (string, required) — The URL of the embed link.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `poll`
  - `poll_id` (string, required) — The ID of the poll you wish to include.
  - `show_options_initially` (boolean, optional) — Whether to show the poll options initially. Defaults to false.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `quote`
  - `quote` (string, required) — The text of the quote.
  - `alignment` (enum, optional) — The text alignment of the quote. Defaults depend on the variant.
    - Allowed values: `left`, `center`, `right`
  - `author` (string, optional) — The author of the quote.
  - `variant` (enum, optional) — The type of quote block. Defaults to "block".
    - Allowed values: `block`, `inline`, `quotation`
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `content_break`
- `type`: `paywall_break`
  - `paywall_id` (string, required) — The ID of the paywall.

### PostWebRecipients

- `tier_ids` (list of string, optional) — The tier IDs to target. Accepts specific tier UUIDs or the special values `"free"`, `"premium"`, or `"all"`. When `"all"` is provided, targets all subscriber tiers — free subscribers, and premium subscribers if the publication has an active paid tier.
- `include_segment_ids` (list of string, optional)
- `exclude_segment_ids` (list of string, optional)

### PostEmailRecipients

- `tier_ids` (list of string, optional) — The tier IDs to target. Accepts specific tier UUIDs or the special values `"free"`, `"premium"`, or `"all"`. When `"all"` is provided, targets all subscriber tiers — free subscribers, and premium subscribers if the publication has an active paid tier. Cannot be combined with `include_segment_ids`.
- `include_segment_ids` (list of string, optional) — Cannot be combined with `tier_ids`.
- `exclude_segment_ids` (list of string, optional)

### Link

- `href` (string, required) — The URL of the link.
- `target` (string, optional) — The target of the link (e.g., _blank).

### EmbeddableBlocks

A block in the post content that can be embedded within a column.

- `type`: `paragraph`
  - `formattedText` (list of ParagraphBlockTextSection, optional) — The formatted content of the paragraph.
  - `plaintext` (string, optional) — The plaintext content of the paragraph.
  - `textAlign` (enum, optional) — Legacy paragraph alignment field. Use `textAlignment` for new integrations.
    - Allowed values: `left`, `center`, `right`
  - `textAlignment` (enum, optional) — The text alignment of the paragraph (e.g., left, center, right).
    - Allowed values: `left`, `center`, `right`
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `image`
  - `imageUrl` (string, required) — The URL of the image.
  - `alt_text` (string, optional) — Alternative text for the image.
  - `caption` (string, optional) — A caption for the image.
  - `captionAlignment` (enum, optional) — The text alignment of the caption.
    - Allowed values: `left`, `center`, `right`
  - `imageAlignment` (enum, optional) — The text alignment of the image.
    - Allowed values: `left`, `center`, `right`
  - `title` (string, optional) — The title of the image.
  - `url` (string, optional) — The URL that the image should link to.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
  - `width` (integer, optional) — The width of the image. Should be between 1 and 100.
- `type`: `button`
  - `href` (string, required) — The URL the button should use.
  - `text` (string, required) — The text content of the button.
  - `alignment` (enum, optional) — The text alignment of the button.
    - Allowed values: `left`, `center`, `right`
  - `size` (enum, optional) — The size of the button (e.g., small, normal, large).
    - Allowed values: `small`, `normal`, `large`
  - `target` (string, optional) — The target of the button (e.g., _blank).
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `heading`
  - `level` (enum, required) — The level of the header (e.g., 1, 2, 3, etc.).
    - Allowed values: `1`, `2`, `3`, `4`, `5`, `6`
  - `anchorHeader` (boolean, optional, default: true) — Whether the header should be an anchor header.
  - `anchorIncludeInToc` (boolean, optional, default: true) — Whether the header should be included in the table of contents.
  - `formattedText` (list of ParagraphBlockTextSection, optional) — The formatted content of the header, supporting links and inline styling.
  - `text` (string, optional) — The text content of the header. Ignored if `formattedText` is provided.
  - `textAlignment` (enum, optional) — The text alignment of the header (e.g., left, center, right).
    - Allowed values: `left`, `center`, `right`
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `rss`
  - `articleLayout` (enum, optional) — The layout of the articles from the feed.
    - Allowed values: `1-col`, `2-col`, `3-col`, `4-col`
  - `articlesToShow` (integer, optional) — The number of articles to show from the feed.
  - `ctaAlignment` (enum, optional) — The alignment of the call to action.
    - Allowed values: `Left`, `Center`, `Right`
  - `ctaStyle` (enum, optional) — The style of the call to action.
    - Allowed values: `CTA button`, `CTA link`, `Title as link`, `Thumbnail as link`, `Title and thumbnail as link`
  - `ctaText` (string, optional) — The text of the call to action. Applicable if ctaStyle is button or link.
  - `externalRssFeedId` (string, optional) — The ID of the external RSS feed.
  - `refreshOnSend` (boolean, optional) — Whether or not to refresh the contents from the RSS feed before sending out the email.
  - `rssFeedUrl` (string, optional) — The URL of the RSS feed.
  - `selectionMode` (enum, optional) — How to select feed articles, by count or time window.
    - Allowed values: `count`, `time`
  - `showArticleThumbnail` (boolean, optional) — Whether to show the article thumbnail.
  - `showArticleTitle` (boolean, optional) — Whether to show the article title.
  - `showAuthor` (boolean, optional) — Whether to show the author.
  - `showCategories` (boolean, optional) — Whether to show the categories.
  - `showContent` (boolean, optional) — Whether to show the article content.
  - `showCta` (boolean, optional) — Whether to show a call to action.
  - `showDescription` (boolean, optional) — Whether to show the article description.
  - `showPublishedDate` (boolean, optional) — Whether to show the date the article was published
  - `thumbnailPosition` (enum, optional) — The position of the thumbnail.
    - Allowed values: `Above Title`, `Below Title`, `Left of content`, `Right of content`, `Alternating Horizontally`
  - `timeWindowHours` (integer, optional) — Trailing window in hours when selectionMode is time.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `advertisement`
  - `opportunity_id` (string, required) — The ID of the Advertisement opportunity.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.
- `type`: `advertisement_logo`
  - `opportunity_id` (string, required) — The ID of the advertisement opportunity whose logo to display.
  - `override_sponsor_text` (enum, required) — The sponsor text to display with the advertisement logo. Required.
    - Allowed values: `sponsored_by`, `together_with`, `in_partnership_with`, `presented_by`, `todays_sponsor`
  - `override_align` (enum, optional) — The logo alignment. Defaults to center.
    - Allowed values: `left`, `center`, `right`
  - `override_width` (integer, optional) — The logo width as a percentage. Must be greater than 0. Defaults to 100.
  - `visibility_settings` (VisibilitySettings, optional) — Optional rules for when/where this block is shown, including dynamic content targeting via condition sets.
  - `visual_settings` (VisualSettings, optional) — Optional styling for borders, spacing, colors, etc.

### ListBlockItemData

- `text` (string, optional) — The plain text content of the list item.
- `formattedText` (list of ParagraphBlockTextSection, optional) — The formatted content of the list item.

## Examples

**Request**

```json
{
  "title": "The Kitchen Sink Post (refactored version)",
  "blocks": [
    {
      "type": "heading",
      "level": "2",
      "anchorHeader": false,
      "anchorIncludeInToc": false,
      "text": "This is my block!!!",
      "textAlignment": "center"
    },
    {
      "type": "list",
      "items": [
        "a",
        "b",
        "c"
      ],
      "listType": "ordered"
    },
    {
      "type": "list",
      "items": [
        "d",
        "e",
        "f"
      ],
      "listType": "ordered",
      "startNumber": 4
    },
    {
      "type": "list",
      "items": [
        "g",
        "h",
        "i"
      ],
      "listType": "unordered",
      "startNumber": 4
    },
    {
      "type": "table",
      "rows": [
        [
          {
            "text": "A"
          },
          {
            "text": "B",
            "alignment": "center"
          },
          {
            "text": "C",
            "alignment": "right"
          }
        ],
        [
          {
            "text": "D",
            "alignment": "right"
          },
          {
            "text": "E",
            "alignment": "center"
          },
          {
            "text": "F",
            "alignment": "left"
          }
        ]
      ],
      "headerColumn": true,
      "headerRow": true
    },
    {
      "type": "table",
      "rows": [
        [
          {
            "text": "A"
          },
          {
            "text": "B"
          },
          {
            "text": "C"
          }
        ],
        [
          {
            "text": "D"
          },
          {
            "text": "E"
          },
          {
            "text": "F"
          }
        ]
      ]
    },
    {
      "type": "table",
      "rows": [
        [
          {
            "text": "A"
          },
          {
            "text": "B"
          },
          {
            "text": "C"
          }
        ],
        [
          {
            "text": "D"
          },
          {
            "text": "E"
          },
          {
            "text": "F"
          }
        ]
      ],
      "headerRow": false
    },
    {
      "type": "columns",
      "columns": [
        {
          "blocks": [
            {
              "type": "paragraph",
              "plaintext": "Marble Column 1 {{email}}"
            }
          ]
        },
        {
          "blocks": [
            {
              "type": "image",
              "imageUrl": "https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg",
              "alt_text": "A picture of Barry Obama",
              "caption": "One Cool President",
              "captionAlignment": "center",
              "imageAlignment": "right",
              "title": "Barry O",
              "url": "https://www.whitehouse.gov/",
              "width": 75
            }
          ]
        }
      ]
    },
    {
      "type": "advertisement",
      "opportunity_id": "d8dfa6be-24b5-4cad-8350-ae44366dbd4c"
    },
    {
      "type": "image",
      "imageUrl": "https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg",
      "alt_text": "A picture of Barry Obama",
      "caption": "One Cool President",
      "captionAlignment": "center",
      "imageAlignment": "right",
      "title": "Barry O",
      "url": "https://www.whitehouse.gov/",
      "width": 75
    },
    {
      "type": "paragraph",
      "formattedText": [
        {
          "text": "This is going to be "
        },
        {
          "text": "a really, really awesome time ",
          "styling": [
            "bold"
          ],
          "text_color": "#111111"
        },
        {
          "text": "Are you ready for this?",
          "styling": [
            "italic",
            "bold",
            "strikethrough"
          ],
          "highlight_color": "#fff3cd"
        }
      ],
      "textAlignment": "left"
    },
    {
      "type": "button",
      "href": "/subscribe",
      "text": "Subscribe",
      "alignment": "center",
      "size": "large",
      "target": "_blank"
    },
    {
      "type": "button",
      "href": "/signup",
      "text": "Sign Up",
      "alignment": "right",
      "size": "small",
      "target": "_blank"
    },
    {
      "type": "button",
      "href": "/",
      "text": "View Posts",
      "target": "_blank"
    },
    {
      "type": "heading",
      "level": "4",
      "anchorHeader": true,
      "anchorIncludeInToc": true,
      "text": "This is my block!!!",
      "textAlignment": "right"
    }
  ],
  "subtitle": "Contains lots of examples of each block type and the various settings you could use",
  "post_template_id": "post_template_00000000-0000-0000-0000-000000000000",
  "scheduled_at": "2024-12-25T12:00:00Z",
  "custom_link_tracking_enabled": true,
  "email_capture_type_override": "none",
  "override_scheduled_at": "2022-10-26T14:01:16Z",
  "social_share": "comments_and_likes_only",
  "thumbnail_image_url": "https://images.squarespace-cdn.com/content/v1/56e4ca0540261d39b90e4b18/1605047208324-PONGEYKEAKTMM1LANHJ5/1ED706BF-A70B-4F26-B3D5-266B449DDA8A_1_105_c.jpeg",
  "recipients": {
    "web": {
      "tier_ids": [
        "premium"
      ]
    },
    "email": {
      "tier_ids": [
        "premium",
        "free"
      ],
      "include_segment_ids": [
        "seg_6426b403-39f5-42bd-86e9-9533fb0099e7"
      ],
      "exclude_segment_ids": [
        "seg_e34b4085-aef6-449f-a699-7563f915f852"
      ]
    }
  },
  "email_settings": {
    "from_address": "from_address",
    "custom_live_url": "https://beehiiv.com",
    "display_title_in_email": true,
    "display_byline_in_email": true,
    "display_subtitle_in_email": true,
    "email_header_engagement_buttons": "email_header_engagement_buttons",
    "email_header_social_share": "email_header_social_share",
    "email_preview_text": "email_preview_text",
    "email_subject_line": "email_subject_line"
  },
  "web_settings": {
    "display_subtitle_on_web": true,
    "display_thumbnail_on_web": true,
    "display_title_on_web": true,
    "hide_from_feed": true,
    "slug": "and-this-is-gonna-rock"
  },
  "seo_settings": {
    "default_description": "default_description",
    "default_title": "default_title",
    "og_description": "OpenGraph description",
    "og_title": "Opengraph Title",
    "twitter_description": "Twitter Stuff",
    "twitter_title": "My Twitter Article"
  },
  "content_tags": [
    "Obama",
    "Care",
    "Rocks",
    "Healthcare"
  ]
}
```

**Response**

```json
{
  "data": {
    "id": "post_00000000-0000-0000-0000-000000000000",
    "preview_url": "https://app.beehiiv.com/posts/post_00000000-0000-0000-0000-000000000000/preview"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/posts"

payload = {
    "title": "The Kitchen Sink Post (refactored version)",
    "blocks": [
        {
            "type": "heading",
            "level": "2",
            "anchorHeader": False,
            "anchorIncludeInToc": False,
            "text": "This is my block!!!",
            "textAlignment": "center"
        },
        {
            "type": "list",
            "items": ["a", "b", "c"],
            "listType": "ordered"
        },
        {
            "type": "list",
            "items": ["d", "e", "f"],
            "listType": "ordered",
            "startNumber": 4
        },
        {
            "type": "list",
            "items": ["g", "h", "i"],
            "listType": "unordered",
            "startNumber": 4
        },
        {
            "type": "table",
            "rows": [[
                    { "text": "A" },
                    {
                        "text": "B",
                        "alignment": "center"
                    },
                    {
                        "text": "C",
                        "alignment": "right"
                    }
                ], [
                    {
                        "text": "D",
                        "alignment": "right"
                    },
                    {
                        "text": "E",
                        "alignment": "center"
                    },
                    {
                        "text": "F",
                        "alignment": "left"
                    }
                ]],
            "headerColumn": True,
            "headerRow": True
        },
        {
            "type": "table",
            "rows": [[{ "text": "A" }, { "text": "B" }, { "text": "C" }], [{ "text": "D" }, { "text": "E" }, { "text": "F" }]]
        },
        {
            "type": "table",
            "rows": [[{ "text": "A" }, { "text": "B" }, { "text": "C" }], [{ "text": "D" }, { "text": "E" }, { "text": "F" }]],
            "headerRow": False
        },
        {
            "type": "columns",
            "columns": [{ "blocks": [
                        {
                            "type": "paragraph",
                            "plaintext": "Marble Column 1 {{email}}"
                        }
                    ] }, { "blocks": [
                        {
                            "type": "image",
                            "imageUrl": "https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg",
                            "alt_text": "A picture of Barry Obama",
                            "caption": "One Cool President",
                            "captionAlignment": "center",
                            "imageAlignment": "right",
                            "title": "Barry O",
                            "url": "https://www.whitehouse.gov/",
                            "width": 75
                        }
                    ] }]
        },
        {
            "type": "advertisement",
            "opportunity_id": "d8dfa6be-24b5-4cad-8350-ae44366dbd4c"
        },
        {
            "type": "image",
            "imageUrl": "https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg",
            "alt_text": "A picture of Barry Obama",
            "caption": "One Cool President",
            "captionAlignment": "center",
            "imageAlignment": "right",
            "title": "Barry O",
            "url": "https://www.whitehouse.gov/",
            "width": 75
        },
        {
            "type": "paragraph",
            "formattedText": [
                { "text": "This is going to be " },
                {
                    "text": "a really, really awesome time ",
                    "styling": ["bold"],
                    "text_color": "#111111"
                },
                {
                    "text": "Are you ready for this?",
                    "styling": ["italic", "bold", "strikethrough"],
                    "highlight_color": "#fff3cd"
                }
            ],
            "textAlignment": "left"
        },
        {
            "type": "button",
            "href": "/subscribe",
            "text": "Subscribe",
            "alignment": "center",
            "size": "large",
            "target": "_blank"
        },
        {
            "type": "button",
            "href": "/signup",
            "text": "Sign Up",
            "alignment": "right",
            "size": "small",
            "target": "_blank"
        },
        {
            "type": "button",
            "href": "/",
            "text": "View Posts",
            "target": "_blank"
        },
        {
            "type": "heading",
            "level": "4",
            "anchorHeader": True,
            "anchorIncludeInToc": True,
            "text": "This is my block!!!",
            "textAlignment": "right"
        }
    ],
    "subtitle": "Contains lots of examples of each block type and the various settings you could use",
    "post_template_id": "post_template_00000000-0000-0000-0000-000000000000",
    "scheduled_at": "2024-12-25T12:00:00Z",
    "custom_link_tracking_enabled": True,
    "email_capture_type_override": "none",
    "override_scheduled_at": "2022-10-26T14:01:16Z",
    "social_share": "comments_and_likes_only",
    "thumbnail_image_url": "https://images.squarespace-cdn.com/content/v1/56e4ca0540261d39b90e4b18/1605047208324-PONGEYKEAKTMM1LANHJ5/1ED706BF-A70B-4F26-B3D5-266B449DDA8A_1_105_c.jpeg",
    "recipients": {
        "web": { "tier_ids": ["premium"] },
        "email": {
            "tier_ids": ["premium", "free"],
            "include_segment_ids": ["seg_6426b403-39f5-42bd-86e9-9533fb0099e7"],
            "exclude_segment_ids": ["seg_e34b4085-aef6-449f-a699-7563f915f852"]
        }
    },
    "email_settings": {
        "from_address": "from_address",
        "custom_live_url": "https://beehiiv.com",
        "display_title_in_email": True,
        "display_byline_in_email": True,
        "display_subtitle_in_email": True,
        "email_header_engagement_buttons": "email_header_engagement_buttons",
        "email_header_social_share": "email_header_social_share",
        "email_preview_text": "email_preview_text",
        "email_subject_line": "email_subject_line"
    },
    "web_settings": {
        "display_subtitle_on_web": True,
        "display_thumbnail_on_web": True,
        "display_title_on_web": True,
        "hide_from_feed": True,
        "slug": "and-this-is-gonna-rock"
    },
    "seo_settings": {
        "default_description": "default_description",
        "default_title": "default_title",
        "og_description": "OpenGraph description",
        "og_title": "Opengraph Title",
        "twitter_description": "Twitter Stuff",
        "twitter_title": "My Twitter Article"
    },
    "content_tags": ["Obama", "Care", "Rocks", "Healthcare"]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/posts';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"title":"The Kitchen Sink Post (refactored version)","blocks":[{"type":"heading","level":"2","anchorHeader":false,"anchorIncludeInToc":false,"text":"This is my block!!!","textAlignment":"center"},{"type":"list","items":["a","b","c"],"listType":"ordered"},{"type":"list","items":["d","e","f"],"listType":"ordered","startNumber":4},{"type":"list","items":["g","h","i"],"listType":"unordered","startNumber":4},{"type":"table","rows":[[{"text":"A"},{"text":"B","alignment":"center"},{"text":"C","alignment":"right"}],[{"text":"D","alignment":"right"},{"text":"E","alignment":"center"},{"text":"F","alignment":"left"}]],"headerColumn":true,"headerRow":true},{"type":"table","rows":[[{"text":"A"},{"text":"B"},{"text":"C"}],[{"text":"D"},{"text":"E"},{"text":"F"}]]},{"type":"table","rows":[[{"text":"A"},{"text":"B"},{"text":"C"}],[{"text":"D"},{"text":"E"},{"text":"F"}]],"headerRow":false},{"type":"columns","columns":[{"blocks":[{"type":"paragraph","plaintext":"Marble Column 1 {{email}}"}]},{"blocks":[{"type":"image","imageUrl":"https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg","alt_text":"A picture of Barry Obama","caption":"One Cool President","captionAlignment":"center","imageAlignment":"right","title":"Barry O","url":"https://www.whitehouse.gov/","width":75}]}]},{"type":"advertisement","opportunity_id":"d8dfa6be-24b5-4cad-8350-ae44366dbd4c"},{"type":"image","imageUrl":"https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg","alt_text":"A picture of Barry Obama","caption":"One Cool President","captionAlignment":"center","imageAlignment":"right","title":"Barry O","url":"https://www.whitehouse.gov/","width":75},{"type":"paragraph","formattedText":[{"text":"This is going to be "},{"text":"a really, really awesome time ","styling":["bold"],"text_color":"#111111"},{"text":"Are you ready for this?","styling":["italic","bold","strikethrough"],"highlight_color":"#fff3cd"}],"textAlignment":"left"},{"type":"button","href":"/subscribe","text":"Subscribe","alignment":"center","size":"large","target":"_blank"},{"type":"button","href":"/signup","text":"Sign Up","alignment":"right","size":"small","target":"_blank"},{"type":"button","href":"/","text":"View Posts","target":"_blank"},{"type":"heading","level":"4","anchorHeader":true,"anchorIncludeInToc":true,"text":"This is my block!!!","textAlignment":"right"}],"subtitle":"Contains lots of examples of each block type and the various settings you could use","post_template_id":"post_template_00000000-0000-0000-0000-000000000000","scheduled_at":"2024-12-25T12:00:00Z","custom_link_tracking_enabled":true,"email_capture_type_override":"none","override_scheduled_at":"2022-10-26T14:01:16Z","social_share":"comments_and_likes_only","thumbnail_image_url":"https://images.squarespace-cdn.com/content/v1/56e4ca0540261d39b90e4b18/1605047208324-PONGEYKEAKTMM1LANHJ5/1ED706BF-A70B-4F26-B3D5-266B449DDA8A_1_105_c.jpeg","recipients":{"web":{"tier_ids":["premium"]},"email":{"tier_ids":["premium","free"],"include_segment_ids":["seg_6426b403-39f5-42bd-86e9-9533fb0099e7"],"exclude_segment_ids":["seg_e34b4085-aef6-449f-a699-7563f915f852"]}},"email_settings":{"from_address":"from_address","custom_live_url":"https://beehiiv.com","display_title_in_email":true,"display_byline_in_email":true,"display_subtitle_in_email":true,"email_header_engagement_buttons":"email_header_engagement_buttons","email_header_social_share":"email_header_social_share","email_preview_text":"email_preview_text","email_subject_line":"email_subject_line"},"web_settings":{"display_subtitle_on_web":true,"display_thumbnail_on_web":true,"display_title_on_web":true,"hide_from_feed":true,"slug":"and-this-is-gonna-rock"},"seo_settings":{"default_description":"default_description","default_title":"default_title","og_description":"OpenGraph description","og_title":"Opengraph Title","twitter_description":"Twitter Stuff","twitter_title":"My Twitter Article"},"content_tags":["Obama","Care","Rocks","Healthcare"]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/posts"

	payload := strings.NewReader("{\n  \"title\": \"The Kitchen Sink Post (refactored version)\",\n  \"blocks\": [\n    {\n      \"type\": \"heading\",\n      \"level\": \"2\",\n      \"anchorHeader\": false,\n      \"anchorIncludeInToc\": false,\n      \"text\": \"This is my block!!!\",\n      \"textAlignment\": \"center\"\n    },\n    {\n      \"type\": \"list\",\n      \"items\": [\n        \"a\",\n        \"b\",\n        \"c\"\n      ],\n      \"listType\": \"ordered\"\n    },\n    {\n      \"type\": \"list\",\n      \"items\": [\n        \"d\",\n        \"e\",\n        \"f\"\n      ],\n      \"listType\": \"ordered\",\n      \"startNumber\": 4\n    },\n    {\n      \"type\": \"list\",\n      \"items\": [\n        \"g\",\n        \"h\",\n        \"i\"\n      ],\n      \"listType\": \"unordered\",\n      \"startNumber\": 4\n    },\n    {\n      \"type\": \"table\",\n      \"rows\": [\n        [\n          {\n            \"text\": \"A\"\n          },\n          {\n            \"text\": \"B\",\n            \"alignment\": \"center\"\n          },\n          {\n            \"text\": \"C\",\n            \"alignment\": \"right\"\n          }\n        ],\n        [\n          {\n            \"text\": \"D\",\n            \"alignment\": \"right\"\n          },\n          {\n            \"text\": \"E\",\n            \"alignment\": \"center\"\n          },\n          {\n            \"text\": \"F\",\n            \"alignment\": \"left\"\n          }\n        ]\n      ],\n      \"headerColumn\": true,\n      \"headerRow\": true\n    },\n    {\n      \"type\": \"table\",\n      \"rows\": [\n        [\n          {\n            \"text\": \"A\"\n          },\n          {\n            \"text\": \"B\"\n          },\n          {\n            \"text\": \"C\"\n          }\n        ],\n        [\n          {\n            \"text\": \"D\"\n          },\n          {\n            \"text\": \"E\"\n          },\n          {\n            \"text\": \"F\"\n          }\n        ]\n      ]\n    },\n    {\n      \"type\": \"table\",\n      \"rows\": [\n        [\n          {\n            \"text\": \"A\"\n          },\n          {\n            \"text\": \"B\"\n          },\n          {\n            \"text\": \"C\"\n          }\n        ],\n        [\n          {\n            \"text\": \"D\"\n          },\n          {\n            \"text\": \"E\"\n          },\n          {\n            \"text\": \"F\"\n          }\n        ]\n      ],\n      \"headerRow\": false\n    },\n    {\n      \"type\": \"columns\",\n      \"columns\": [\n        {\n          \"blocks\": [\n            {\n              \"type\": \"paragraph\",\n              \"plaintext\": \"Marble Column 1 {{email}}\"\n            }\n          ]\n        },\n        {\n          \"blocks\": [\n            {\n              \"type\": \"image\",\n              \"imageUrl\": \"https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg\",\n              \"alt_text\": \"A picture of Barry Obama\",\n              \"caption\": \"One Cool President\",\n              \"captionAlignment\": \"center\",\n              \"imageAlignment\": \"right\",\n              \"title\": \"Barry O\",\n              \"url\": \"https://www.whitehouse.gov/\",\n              \"width\": 75\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"type\": \"advertisement\",\n      \"opportunity_id\": \"d8dfa6be-24b5-4cad-8350-ae44366dbd4c\"\n    },\n    {\n      \"type\": \"image\",\n      \"imageUrl\": \"https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg\",\n      \"alt_text\": \"A picture of Barry Obama\",\n      \"caption\": \"One Cool President\",\n      \"captionAlignment\": \"center\",\n      \"imageAlignment\": \"right\",\n      \"title\": \"Barry O\",\n      \"url\": \"https://www.whitehouse.gov/\",\n      \"width\": 75\n    },\n    {\n      \"type\": \"paragraph\",\n      \"formattedText\": [\n        {\n          \"text\": \"This is going to be \"\n        },\n        {\n          \"text\": \"a really, really awesome time \",\n          \"styling\": [\n            \"bold\"\n          ],\n          \"text_color\": \"#111111\"\n        },\n        {\n          \"text\": \"Are you ready for this?\",\n          \"styling\": [\n            \"italic\",\n            \"bold\",\n            \"strikethrough\"\n          ],\n          \"highlight_color\": \"#fff3cd\"\n        }\n      ],\n      \"textAlignment\": \"left\"\n    },\n    {\n      \"type\": \"button\",\n      \"href\": \"/subscribe\",\n      \"text\": \"Subscribe\",\n      \"alignment\": \"center\",\n      \"size\": \"large\",\n      \"target\": \"_blank\"\n    },\n    {\n      \"type\": \"button\",\n      \"href\": \"/signup\",\n      \"text\": \"Sign Up\",\n      \"alignment\": \"right\",\n      \"size\": \"small\",\n      \"target\": \"_blank\"\n    },\n    {\n      \"type\": \"button\",\n      \"href\": \"/\",\n      \"text\": \"View Posts\",\n      \"target\": \"_blank\"\n    },\n    {\n      \"type\": \"heading\",\n      \"level\": \"4\",\n      \"anchorHeader\": true,\n      \"anchorIncludeInToc\": true,\n      \"text\": \"This is my block!!!\",\n      \"textAlignment\": \"right\"\n    }\n  ],\n  \"subtitle\": \"Contains lots of examples of each block type and the various settings you could use\",\n  \"post_template_id\": \"post_template_00000000-0000-0000-0000-000000000000\",\n  \"scheduled_at\": \"2024-12-25T12:00:00Z\",\n  \"custom_link_tracking_enabled\": true,\n  \"email_capture_type_override\": \"none\",\n  \"override_scheduled_at\": \"2022-10-26T14:01:16Z\",\n  \"social_share\": \"comments_and_likes_only\",\n  \"thumbnail_image_url\": \"https://images.squarespace-cdn.com/content/v1/56e4ca0540261d39b90e4b18/1605047208324-PONGEYKEAKTMM1LANHJ5/1ED706BF-A70B-4F26-B3D5-266B449DDA8A_1_105_c.jpeg\",\n  \"recipients\": {\n    \"web\": {\n      \"tier_ids\": [\n        \"premium\"\n      ]\n    },\n    \"email\": {\n      \"tier_ids\": [\n        \"premium\",\n        \"free\"\n      ],\n      \"include_segment_ids\": [\n        \"seg_6426b403-39f5-42bd-86e9-9533fb0099e7\"\n      ],\n      \"exclude_segment_ids\": [\n        \"seg_e34b4085-aef6-449f-a699-7563f915f852\"\n      ]\n    }\n  },\n  \"email_settings\": {\n    \"from_address\": \"from_address\",\n    \"custom_live_url\": \"https://beehiiv.com\",\n    \"display_title_in_email\": true,\n    \"display_byline_in_email\": true,\n    \"display_subtitle_in_email\": true,\n    \"email_header_engagement_buttons\": \"email_header_engagement_buttons\",\n    \"email_header_social_share\": \"email_header_social_share\",\n    \"email_preview_text\": \"email_preview_text\",\n    \"email_subject_line\": \"email_subject_line\"\n  },\n  \"web_settings\": {\n    \"display_subtitle_on_web\": true,\n    \"display_thumbnail_on_web\": true,\n    \"display_title_on_web\": true,\n    \"hide_from_feed\": true,\n    \"slug\": \"and-this-is-gonna-rock\"\n  },\n  \"seo_settings\": {\n    \"default_description\": \"default_description\",\n    \"default_title\": \"default_title\",\n    \"og_description\": \"OpenGraph description\",\n    \"og_title\": \"Opengraph Title\",\n    \"twitter_description\": \"Twitter Stuff\",\n    \"twitter_title\": \"My Twitter Article\"\n  },\n  \"content_tags\": [\n    \"Obama\",\n    \"Care\",\n    \"Rocks\",\n    \"Healthcare\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/posts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"title\": \"The Kitchen Sink Post (refactored version)\",\n  \"blocks\": [\n    {\n      \"type\": \"heading\",\n      \"level\": \"2\",\n      \"anchorHeader\": false,\n      \"anchorIncludeInToc\": false,\n      \"text\": \"This is my block!!!\",\n      \"textAlignment\": \"center\"\n    },\n    {\n      \"type\": \"list\",\n      \"items\": [\n        \"a\",\n        \"b\",\n        \"c\"\n      ],\n      \"listType\": \"ordered\"\n    },\n    {\n      \"type\": \"list\",\n      \"items\": [\n        \"d\",\n        \"e\",\n        \"f\"\n      ],\n      \"listType\": \"ordered\",\n      \"startNumber\": 4\n    },\n    {\n      \"type\": \"list\",\n      \"items\": [\n        \"g\",\n        \"h\",\n        \"i\"\n      ],\n      \"listType\": \"unordered\",\n      \"startNumber\": 4\n    },\n    {\n      \"type\": \"table\",\n      \"rows\": [\n        [\n          {\n            \"text\": \"A\"\n          },\n          {\n            \"text\": \"B\",\n            \"alignment\": \"center\"\n          },\n          {\n            \"text\": \"C\",\n            \"alignment\": \"right\"\n          }\n        ],\n        [\n          {\n            \"text\": \"D\",\n            \"alignment\": \"right\"\n          },\n          {\n            \"text\": \"E\",\n            \"alignment\": \"center\"\n          },\n          {\n            \"text\": \"F\",\n            \"alignment\": \"left\"\n          }\n        ]\n      ],\n      \"headerColumn\": true,\n      \"headerRow\": true\n    },\n    {\n      \"type\": \"table\",\n      \"rows\": [\n        [\n          {\n            \"text\": \"A\"\n          },\n          {\n            \"text\": \"B\"\n          },\n          {\n            \"text\": \"C\"\n          }\n        ],\n        [\n          {\n            \"text\": \"D\"\n          },\n          {\n            \"text\": \"E\"\n          },\n          {\n            \"text\": \"F\"\n          }\n        ]\n      ]\n    },\n    {\n      \"type\": \"table\",\n      \"rows\": [\n        [\n          {\n            \"text\": \"A\"\n          },\n          {\n            \"text\": \"B\"\n          },\n          {\n            \"text\": \"C\"\n          }\n        ],\n        [\n          {\n            \"text\": \"D\"\n          },\n          {\n            \"text\": \"E\"\n          },\n          {\n            \"text\": \"F\"\n          }\n        ]\n      ],\n      \"headerRow\": false\n    },\n    {\n      \"type\": \"columns\",\n      \"columns\": [\n        {\n          \"blocks\": [\n            {\n              \"type\": \"paragraph\",\n              \"plaintext\": \"Marble Column 1 {{email}}\"\n            }\n          ]\n        },\n        {\n          \"blocks\": [\n            {\n              \"type\": \"image\",\n              \"imageUrl\": \"https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg\",\n              \"alt_text\": \"A picture of Barry Obama\",\n              \"caption\": \"One Cool President\",\n              \"captionAlignment\": \"center\",\n              \"imageAlignment\": \"right\",\n              \"title\": \"Barry O\",\n              \"url\": \"https://www.whitehouse.gov/\",\n              \"width\": 75\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"type\": \"advertisement\",\n      \"opportunity_id\": \"d8dfa6be-24b5-4cad-8350-ae44366dbd4c\"\n    },\n    {\n      \"type\": \"image\",\n      \"imageUrl\": \"https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg\",\n      \"alt_text\": \"A picture of Barry Obama\",\n      \"caption\": \"One Cool President\",\n      \"captionAlignment\": \"center\",\n      \"imageAlignment\": \"right\",\n      \"title\": \"Barry O\",\n      \"url\": \"https://www.whitehouse.gov/\",\n      \"width\": 75\n    },\n    {\n      \"type\": \"paragraph\",\n      \"formattedText\": [\n        {\n          \"text\": \"This is going to be \"\n        },\n        {\n          \"text\": \"a really, really awesome time \",\n          \"styling\": [\n            \"bold\"\n          ],\n          \"text_color\": \"#111111\"\n        },\n        {\n          \"text\": \"Are you ready for this?\",\n          \"styling\": [\n            \"italic\",\n            \"bold\",\n            \"strikethrough\"\n          ],\n          \"highlight_color\": \"#fff3cd\"\n        }\n      ],\n      \"textAlignment\": \"left\"\n    },\n    {\n      \"type\": \"button\",\n      \"href\": \"/subscribe\",\n      \"text\": \"Subscribe\",\n      \"alignment\": \"center\",\n      \"size\": \"large\",\n      \"target\": \"_blank\"\n    },\n    {\n      \"type\": \"button\",\n      \"href\": \"/signup\",\n      \"text\": \"Sign Up\",\n      \"alignment\": \"right\",\n      \"size\": \"small\",\n      \"target\": \"_blank\"\n    },\n    {\n      \"type\": \"button\",\n      \"href\": \"/\",\n      \"text\": \"View Posts\",\n      \"target\": \"_blank\"\n    },\n    {\n      \"type\": \"heading\",\n      \"level\": \"4\",\n      \"anchorHeader\": true,\n      \"anchorIncludeInToc\": true,\n      \"text\": \"This is my block!!!\",\n      \"textAlignment\": \"right\"\n    }\n  ],\n  \"subtitle\": \"Contains lots of examples of each block type and the various settings you could use\",\n  \"post_template_id\": \"post_template_00000000-0000-0000-0000-000000000000\",\n  \"scheduled_at\": \"2024-12-25T12:00:00Z\",\n  \"custom_link_tracking_enabled\": true,\n  \"email_capture_type_override\": \"none\",\n  \"override_scheduled_at\": \"2022-10-26T14:01:16Z\",\n  \"social_share\": \"comments_and_likes_only\",\n  \"thumbnail_image_url\": \"https://images.squarespace-cdn.com/content/v1/56e4ca0540261d39b90e4b18/1605047208324-PONGEYKEAKTMM1LANHJ5/1ED706BF-A70B-4F26-B3D5-266B449DDA8A_1_105_c.jpeg\",\n  \"recipients\": {\n    \"web\": {\n      \"tier_ids\": [\n        \"premium\"\n      ]\n    },\n    \"email\": {\n      \"tier_ids\": [\n        \"premium\",\n        \"free\"\n      ],\n      \"include_segment_ids\": [\n        \"seg_6426b403-39f5-42bd-86e9-9533fb0099e7\"\n      ],\n      \"exclude_segment_ids\": [\n        \"seg_e34b4085-aef6-449f-a699-7563f915f852\"\n      ]\n    }\n  },\n  \"email_settings\": {\n    \"from_address\": \"from_address\",\n    \"custom_live_url\": \"https://beehiiv.com\",\n    \"display_title_in_email\": true,\n    \"display_byline_in_email\": true,\n    \"display_subtitle_in_email\": true,\n    \"email_header_engagement_buttons\": \"email_header_engagement_buttons\",\n    \"email_header_social_share\": \"email_header_social_share\",\n    \"email_preview_text\": \"email_preview_text\",\n    \"email_subject_line\": \"email_subject_line\"\n  },\n  \"web_settings\": {\n    \"display_subtitle_on_web\": true,\n    \"display_thumbnail_on_web\": true,\n    \"display_title_on_web\": true,\n    \"hide_from_feed\": true,\n    \"slug\": \"and-this-is-gonna-rock\"\n  },\n  \"seo_settings\": {\n    \"default_description\": \"default_description\",\n    \"default_title\": \"default_title\",\n    \"og_description\": \"OpenGraph description\",\n    \"og_title\": \"Opengraph Title\",\n    \"twitter_description\": \"Twitter Stuff\",\n    \"twitter_title\": \"My Twitter Article\"\n  },\n  \"content_tags\": [\n    \"Obama\",\n    \"Care\",\n    \"Rocks\",\n    \"Healthcare\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/posts")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"title\": \"The Kitchen Sink Post (refactored version)\",\n  \"blocks\": [\n    {\n      \"type\": \"heading\",\n      \"level\": \"2\",\n      \"anchorHeader\": false,\n      \"anchorIncludeInToc\": false,\n      \"text\": \"This is my block!!!\",\n      \"textAlignment\": \"center\"\n    },\n    {\n      \"type\": \"list\",\n      \"items\": [\n        \"a\",\n        \"b\",\n        \"c\"\n      ],\n      \"listType\": \"ordered\"\n    },\n    {\n      \"type\": \"list\",\n      \"items\": [\n        \"d\",\n        \"e\",\n        \"f\"\n      ],\n      \"listType\": \"ordered\",\n      \"startNumber\": 4\n    },\n    {\n      \"type\": \"list\",\n      \"items\": [\n        \"g\",\n        \"h\",\n        \"i\"\n      ],\n      \"listType\": \"unordered\",\n      \"startNumber\": 4\n    },\n    {\n      \"type\": \"table\",\n      \"rows\": [\n        [\n          {\n            \"text\": \"A\"\n          },\n          {\n            \"text\": \"B\",\n            \"alignment\": \"center\"\n          },\n          {\n            \"text\": \"C\",\n            \"alignment\": \"right\"\n          }\n        ],\n        [\n          {\n            \"text\": \"D\",\n            \"alignment\": \"right\"\n          },\n          {\n            \"text\": \"E\",\n            \"alignment\": \"center\"\n          },\n          {\n            \"text\": \"F\",\n            \"alignment\": \"left\"\n          }\n        ]\n      ],\n      \"headerColumn\": true,\n      \"headerRow\": true\n    },\n    {\n      \"type\": \"table\",\n      \"rows\": [\n        [\n          {\n            \"text\": \"A\"\n          },\n          {\n            \"text\": \"B\"\n          },\n          {\n            \"text\": \"C\"\n          }\n        ],\n        [\n          {\n            \"text\": \"D\"\n          },\n          {\n            \"text\": \"E\"\n          },\n          {\n            \"text\": \"F\"\n          }\n        ]\n      ]\n    },\n    {\n      \"type\": \"table\",\n      \"rows\": [\n        [\n          {\n            \"text\": \"A\"\n          },\n          {\n            \"text\": \"B\"\n          },\n          {\n            \"text\": \"C\"\n          }\n        ],\n        [\n          {\n            \"text\": \"D\"\n          },\n          {\n            \"text\": \"E\"\n          },\n          {\n            \"text\": \"F\"\n          }\n        ]\n      ],\n      \"headerRow\": false\n    },\n    {\n      \"type\": \"columns\",\n      \"columns\": [\n        {\n          \"blocks\": [\n            {\n              \"type\": \"paragraph\",\n              \"plaintext\": \"Marble Column 1 {{email}}\"\n            }\n          ]\n        },\n        {\n          \"blocks\": [\n            {\n              \"type\": \"image\",\n              \"imageUrl\": \"https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg\",\n              \"alt_text\": \"A picture of Barry Obama\",\n              \"caption\": \"One Cool President\",\n              \"captionAlignment\": \"center\",\n              \"imageAlignment\": \"right\",\n              \"title\": \"Barry O\",\n              \"url\": \"https://www.whitehouse.gov/\",\n              \"width\": 75\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"type\": \"advertisement\",\n      \"opportunity_id\": \"d8dfa6be-24b5-4cad-8350-ae44366dbd4c\"\n    },\n    {\n      \"type\": \"image\",\n      \"imageUrl\": \"https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg\",\n      \"alt_text\": \"A picture of Barry Obama\",\n      \"caption\": \"One Cool President\",\n      \"captionAlignment\": \"center\",\n      \"imageAlignment\": \"right\",\n      \"title\": \"Barry O\",\n      \"url\": \"https://www.whitehouse.gov/\",\n      \"width\": 75\n    },\n    {\n      \"type\": \"paragraph\",\n      \"formattedText\": [\n        {\n          \"text\": \"This is going to be \"\n        },\n        {\n          \"text\": \"a really, really awesome time \",\n          \"styling\": [\n            \"bold\"\n          ],\n          \"text_color\": \"#111111\"\n        },\n        {\n          \"text\": \"Are you ready for this?\",\n          \"styling\": [\n            \"italic\",\n            \"bold\",\n            \"strikethrough\"\n          ],\n          \"highlight_color\": \"#fff3cd\"\n        }\n      ],\n      \"textAlignment\": \"left\"\n    },\n    {\n      \"type\": \"button\",\n      \"href\": \"/subscribe\",\n      \"text\": \"Subscribe\",\n      \"alignment\": \"center\",\n      \"size\": \"large\",\n      \"target\": \"_blank\"\n    },\n    {\n      \"type\": \"button\",\n      \"href\": \"/signup\",\n      \"text\": \"Sign Up\",\n      \"alignment\": \"right\",\n      \"size\": \"small\",\n      \"target\": \"_blank\"\n    },\n    {\n      \"type\": \"button\",\n      \"href\": \"/\",\n      \"text\": \"View Posts\",\n      \"target\": \"_blank\"\n    },\n    {\n      \"type\": \"heading\",\n      \"level\": \"4\",\n      \"anchorHeader\": true,\n      \"anchorIncludeInToc\": true,\n      \"text\": \"This is my block!!!\",\n      \"textAlignment\": \"right\"\n    }\n  ],\n  \"subtitle\": \"Contains lots of examples of each block type and the various settings you could use\",\n  \"post_template_id\": \"post_template_00000000-0000-0000-0000-000000000000\",\n  \"scheduled_at\": \"2024-12-25T12:00:00Z\",\n  \"custom_link_tracking_enabled\": true,\n  \"email_capture_type_override\": \"none\",\n  \"override_scheduled_at\": \"2022-10-26T14:01:16Z\",\n  \"social_share\": \"comments_and_likes_only\",\n  \"thumbnail_image_url\": \"https://images.squarespace-cdn.com/content/v1/56e4ca0540261d39b90e4b18/1605047208324-PONGEYKEAKTMM1LANHJ5/1ED706BF-A70B-4F26-B3D5-266B449DDA8A_1_105_c.jpeg\",\n  \"recipients\": {\n    \"web\": {\n      \"tier_ids\": [\n        \"premium\"\n      ]\n    },\n    \"email\": {\n      \"tier_ids\": [\n        \"premium\",\n        \"free\"\n      ],\n      \"include_segment_ids\": [\n        \"seg_6426b403-39f5-42bd-86e9-9533fb0099e7\"\n      ],\n      \"exclude_segment_ids\": [\n        \"seg_e34b4085-aef6-449f-a699-7563f915f852\"\n      ]\n    }\n  },\n  \"email_settings\": {\n    \"from_address\": \"from_address\",\n    \"custom_live_url\": \"https://beehiiv.com\",\n    \"display_title_in_email\": true,\n    \"display_byline_in_email\": true,\n    \"display_subtitle_in_email\": true,\n    \"email_header_engagement_buttons\": \"email_header_engagement_buttons\",\n    \"email_header_social_share\": \"email_header_social_share\",\n    \"email_preview_text\": \"email_preview_text\",\n    \"email_subject_line\": \"email_subject_line\"\n  },\n  \"web_settings\": {\n    \"display_subtitle_on_web\": true,\n    \"display_thumbnail_on_web\": true,\n    \"display_title_on_web\": true,\n    \"hide_from_feed\": true,\n    \"slug\": \"and-this-is-gonna-rock\"\n  },\n  \"seo_settings\": {\n    \"default_description\": \"default_description\",\n    \"default_title\": \"default_title\",\n    \"og_description\": \"OpenGraph description\",\n    \"og_title\": \"Opengraph Title\",\n    \"twitter_description\": \"Twitter Stuff\",\n    \"twitter_title\": \"My Twitter Article\"\n  },\n  \"content_tags\": [\n    \"Obama\",\n    \"Care\",\n    \"Rocks\",\n    \"Healthcare\"\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/posts', [
  'body' => '{
  "title": "The Kitchen Sink Post (refactored version)",
  "blocks": [
    {
      "type": "heading",
      "level": "2",
      "anchorHeader": false,
      "anchorIncludeInToc": false,
      "text": "This is my block!!!",
      "textAlignment": "center"
    },
    {
      "type": "list",
      "items": [
        "a",
        "b",
        "c"
      ],
      "listType": "ordered"
    },
    {
      "type": "list",
      "items": [
        "d",
        "e",
        "f"
      ],
      "listType": "ordered",
      "startNumber": 4
    },
    {
      "type": "list",
      "items": [
        "g",
        "h",
        "i"
      ],
      "listType": "unordered",
      "startNumber": 4
    },
    {
      "type": "table",
      "rows": [
        [
          {
            "text": "A"
          },
          {
            "text": "B",
            "alignment": "center"
          },
          {
            "text": "C",
            "alignment": "right"
          }
        ],
        [
          {
            "text": "D",
            "alignment": "right"
          },
          {
            "text": "E",
            "alignment": "center"
          },
          {
            "text": "F",
            "alignment": "left"
          }
        ]
      ],
      "headerColumn": true,
      "headerRow": true
    },
    {
      "type": "table",
      "rows": [
        [
          {
            "text": "A"
          },
          {
            "text": "B"
          },
          {
            "text": "C"
          }
        ],
        [
          {
            "text": "D"
          },
          {
            "text": "E"
          },
          {
            "text": "F"
          }
        ]
      ]
    },
    {
      "type": "table",
      "rows": [
        [
          {
            "text": "A"
          },
          {
            "text": "B"
          },
          {
            "text": "C"
          }
        ],
        [
          {
            "text": "D"
          },
          {
            "text": "E"
          },
          {
            "text": "F"
          }
        ]
      ],
      "headerRow": false
    },
    {
      "type": "columns",
      "columns": [
        {
          "blocks": [
            {
              "type": "paragraph",
              "plaintext": "Marble Column 1 {{email}}"
            }
          ]
        },
        {
          "blocks": [
            {
              "type": "image",
              "imageUrl": "https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg",
              "alt_text": "A picture of Barry Obama",
              "caption": "One Cool President",
              "captionAlignment": "center",
              "imageAlignment": "right",
              "title": "Barry O",
              "url": "https://www.whitehouse.gov/",
              "width": 75
            }
          ]
        }
      ]
    },
    {
      "type": "advertisement",
      "opportunity_id": "d8dfa6be-24b5-4cad-8350-ae44366dbd4c"
    },
    {
      "type": "image",
      "imageUrl": "https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg",
      "alt_text": "A picture of Barry Obama",
      "caption": "One Cool President",
      "captionAlignment": "center",
      "imageAlignment": "right",
      "title": "Barry O",
      "url": "https://www.whitehouse.gov/",
      "width": 75
    },
    {
      "type": "paragraph",
      "formattedText": [
        {
          "text": "This is going to be "
        },
        {
          "text": "a really, really awesome time ",
          "styling": [
            "bold"
          ],
          "text_color": "#111111"
        },
        {
          "text": "Are you ready for this?",
          "styling": [
            "italic",
            "bold",
            "strikethrough"
          ],
          "highlight_color": "#fff3cd"
        }
      ],
      "textAlignment": "left"
    },
    {
      "type": "button",
      "href": "/subscribe",
      "text": "Subscribe",
      "alignment": "center",
      "size": "large",
      "target": "_blank"
    },
    {
      "type": "button",
      "href": "/signup",
      "text": "Sign Up",
      "alignment": "right",
      "size": "small",
      "target": "_blank"
    },
    {
      "type": "button",
      "href": "/",
      "text": "View Posts",
      "target": "_blank"
    },
    {
      "type": "heading",
      "level": "4",
      "anchorHeader": true,
      "anchorIncludeInToc": true,
      "text": "This is my block!!!",
      "textAlignment": "right"
    }
  ],
  "subtitle": "Contains lots of examples of each block type and the various settings you could use",
  "post_template_id": "post_template_00000000-0000-0000-0000-000000000000",
  "scheduled_at": "2024-12-25T12:00:00Z",
  "custom_link_tracking_enabled": true,
  "email_capture_type_override": "none",
  "override_scheduled_at": "2022-10-26T14:01:16Z",
  "social_share": "comments_and_likes_only",
  "thumbnail_image_url": "https://images.squarespace-cdn.com/content/v1/56e4ca0540261d39b90e4b18/1605047208324-PONGEYKEAKTMM1LANHJ5/1ED706BF-A70B-4F26-B3D5-266B449DDA8A_1_105_c.jpeg",
  "recipients": {
    "web": {
      "tier_ids": [
        "premium"
      ]
    },
    "email": {
      "tier_ids": [
        "premium",
        "free"
      ],
      "include_segment_ids": [
        "seg_6426b403-39f5-42bd-86e9-9533fb0099e7"
      ],
      "exclude_segment_ids": [
        "seg_e34b4085-aef6-449f-a699-7563f915f852"
      ]
    }
  },
  "email_settings": {
    "from_address": "from_address",
    "custom_live_url": "https://beehiiv.com",
    "display_title_in_email": true,
    "display_byline_in_email": true,
    "display_subtitle_in_email": true,
    "email_header_engagement_buttons": "email_header_engagement_buttons",
    "email_header_social_share": "email_header_social_share",
    "email_preview_text": "email_preview_text",
    "email_subject_line": "email_subject_line"
  },
  "web_settings": {
    "display_subtitle_on_web": true,
    "display_thumbnail_on_web": true,
    "display_title_on_web": true,
    "hide_from_feed": true,
    "slug": "and-this-is-gonna-rock"
  },
  "seo_settings": {
    "default_description": "default_description",
    "default_title": "default_title",
    "og_description": "OpenGraph description",
    "og_title": "Opengraph Title",
    "twitter_description": "Twitter Stuff",
    "twitter_title": "My Twitter Article"
  },
  "content_tags": [
    "Obama",
    "Care",
    "Rocks",
    "Healthcare"
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/posts");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"title\": \"The Kitchen Sink Post (refactored version)\",\n  \"blocks\": [\n    {\n      \"type\": \"heading\",\n      \"level\": \"2\",\n      \"anchorHeader\": false,\n      \"anchorIncludeInToc\": false,\n      \"text\": \"This is my block!!!\",\n      \"textAlignment\": \"center\"\n    },\n    {\n      \"type\": \"list\",\n      \"items\": [\n        \"a\",\n        \"b\",\n        \"c\"\n      ],\n      \"listType\": \"ordered\"\n    },\n    {\n      \"type\": \"list\",\n      \"items\": [\n        \"d\",\n        \"e\",\n        \"f\"\n      ],\n      \"listType\": \"ordered\",\n      \"startNumber\": 4\n    },\n    {\n      \"type\": \"list\",\n      \"items\": [\n        \"g\",\n        \"h\",\n        \"i\"\n      ],\n      \"listType\": \"unordered\",\n      \"startNumber\": 4\n    },\n    {\n      \"type\": \"table\",\n      \"rows\": [\n        [\n          {\n            \"text\": \"A\"\n          },\n          {\n            \"text\": \"B\",\n            \"alignment\": \"center\"\n          },\n          {\n            \"text\": \"C\",\n            \"alignment\": \"right\"\n          }\n        ],\n        [\n          {\n            \"text\": \"D\",\n            \"alignment\": \"right\"\n          },\n          {\n            \"text\": \"E\",\n            \"alignment\": \"center\"\n          },\n          {\n            \"text\": \"F\",\n            \"alignment\": \"left\"\n          }\n        ]\n      ],\n      \"headerColumn\": true,\n      \"headerRow\": true\n    },\n    {\n      \"type\": \"table\",\n      \"rows\": [\n        [\n          {\n            \"text\": \"A\"\n          },\n          {\n            \"text\": \"B\"\n          },\n          {\n            \"text\": \"C\"\n          }\n        ],\n        [\n          {\n            \"text\": \"D\"\n          },\n          {\n            \"text\": \"E\"\n          },\n          {\n            \"text\": \"F\"\n          }\n        ]\n      ]\n    },\n    {\n      \"type\": \"table\",\n      \"rows\": [\n        [\n          {\n            \"text\": \"A\"\n          },\n          {\n            \"text\": \"B\"\n          },\n          {\n            \"text\": \"C\"\n          }\n        ],\n        [\n          {\n            \"text\": \"D\"\n          },\n          {\n            \"text\": \"E\"\n          },\n          {\n            \"text\": \"F\"\n          }\n        ]\n      ],\n      \"headerRow\": false\n    },\n    {\n      \"type\": \"columns\",\n      \"columns\": [\n        {\n          \"blocks\": [\n            {\n              \"type\": \"paragraph\",\n              \"plaintext\": \"Marble Column 1 {{email}}\"\n            }\n          ]\n        },\n        {\n          \"blocks\": [\n            {\n              \"type\": \"image\",\n              \"imageUrl\": \"https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg\",\n              \"alt_text\": \"A picture of Barry Obama\",\n              \"caption\": \"One Cool President\",\n              \"captionAlignment\": \"center\",\n              \"imageAlignment\": \"right\",\n              \"title\": \"Barry O\",\n              \"url\": \"https://www.whitehouse.gov/\",\n              \"width\": 75\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"type\": \"advertisement\",\n      \"opportunity_id\": \"d8dfa6be-24b5-4cad-8350-ae44366dbd4c\"\n    },\n    {\n      \"type\": \"image\",\n      \"imageUrl\": \"https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg\",\n      \"alt_text\": \"A picture of Barry Obama\",\n      \"caption\": \"One Cool President\",\n      \"captionAlignment\": \"center\",\n      \"imageAlignment\": \"right\",\n      \"title\": \"Barry O\",\n      \"url\": \"https://www.whitehouse.gov/\",\n      \"width\": 75\n    },\n    {\n      \"type\": \"paragraph\",\n      \"formattedText\": [\n        {\n          \"text\": \"This is going to be \"\n        },\n        {\n          \"text\": \"a really, really awesome time \",\n          \"styling\": [\n            \"bold\"\n          ],\n          \"text_color\": \"#111111\"\n        },\n        {\n          \"text\": \"Are you ready for this?\",\n          \"styling\": [\n            \"italic\",\n            \"bold\",\n            \"strikethrough\"\n          ],\n          \"highlight_color\": \"#fff3cd\"\n        }\n      ],\n      \"textAlignment\": \"left\"\n    },\n    {\n      \"type\": \"button\",\n      \"href\": \"/subscribe\",\n      \"text\": \"Subscribe\",\n      \"alignment\": \"center\",\n      \"size\": \"large\",\n      \"target\": \"_blank\"\n    },\n    {\n      \"type\": \"button\",\n      \"href\": \"/signup\",\n      \"text\": \"Sign Up\",\n      \"alignment\": \"right\",\n      \"size\": \"small\",\n      \"target\": \"_blank\"\n    },\n    {\n      \"type\": \"button\",\n      \"href\": \"/\",\n      \"text\": \"View Posts\",\n      \"target\": \"_blank\"\n    },\n    {\n      \"type\": \"heading\",\n      \"level\": \"4\",\n      \"anchorHeader\": true,\n      \"anchorIncludeInToc\": true,\n      \"text\": \"This is my block!!!\",\n      \"textAlignment\": \"right\"\n    }\n  ],\n  \"subtitle\": \"Contains lots of examples of each block type and the various settings you could use\",\n  \"post_template_id\": \"post_template_00000000-0000-0000-0000-000000000000\",\n  \"scheduled_at\": \"2024-12-25T12:00:00Z\",\n  \"custom_link_tracking_enabled\": true,\n  \"email_capture_type_override\": \"none\",\n  \"override_scheduled_at\": \"2022-10-26T14:01:16Z\",\n  \"social_share\": \"comments_and_likes_only\",\n  \"thumbnail_image_url\": \"https://images.squarespace-cdn.com/content/v1/56e4ca0540261d39b90e4b18/1605047208324-PONGEYKEAKTMM1LANHJ5/1ED706BF-A70B-4F26-B3D5-266B449DDA8A_1_105_c.jpeg\",\n  \"recipients\": {\n    \"web\": {\n      \"tier_ids\": [\n        \"premium\"\n      ]\n    },\n    \"email\": {\n      \"tier_ids\": [\n        \"premium\",\n        \"free\"\n      ],\n      \"include_segment_ids\": [\n        \"seg_6426b403-39f5-42bd-86e9-9533fb0099e7\"\n      ],\n      \"exclude_segment_ids\": [\n        \"seg_e34b4085-aef6-449f-a699-7563f915f852\"\n      ]\n    }\n  },\n  \"email_settings\": {\n    \"from_address\": \"from_address\",\n    \"custom_live_url\": \"https://beehiiv.com\",\n    \"display_title_in_email\": true,\n    \"display_byline_in_email\": true,\n    \"display_subtitle_in_email\": true,\n    \"email_header_engagement_buttons\": \"email_header_engagement_buttons\",\n    \"email_header_social_share\": \"email_header_social_share\",\n    \"email_preview_text\": \"email_preview_text\",\n    \"email_subject_line\": \"email_subject_line\"\n  },\n  \"web_settings\": {\n    \"display_subtitle_on_web\": true,\n    \"display_thumbnail_on_web\": true,\n    \"display_title_on_web\": true,\n    \"hide_from_feed\": true,\n    \"slug\": \"and-this-is-gonna-rock\"\n  },\n  \"seo_settings\": {\n    \"default_description\": \"default_description\",\n    \"default_title\": \"default_title\",\n    \"og_description\": \"OpenGraph description\",\n    \"og_title\": \"Opengraph Title\",\n    \"twitter_description\": \"Twitter Stuff\",\n    \"twitter_title\": \"My Twitter Article\"\n  },\n  \"content_tags\": [\n    \"Obama\",\n    \"Care\",\n    \"Rocks\",\n    \"Healthcare\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "title": "The Kitchen Sink Post (refactored version)",
  "blocks": [
    [
      "type": "heading",
      "level": "2",
      "anchorHeader": false,
      "anchorIncludeInToc": false,
      "text": "This is my block!!!",
      "textAlignment": "center"
    ],
    [
      "type": "list",
      "items": ["a", "b", "c"],
      "listType": "ordered"
    ],
    [
      "type": "list",
      "items": ["d", "e", "f"],
      "listType": "ordered",
      "startNumber": 4
    ],
    [
      "type": "list",
      "items": ["g", "h", "i"],
      "listType": "unordered",
      "startNumber": 4
    ],
    [
      "type": "table",
      "rows": [[
          ["text": "A"],
          [
            "text": "B",
            "alignment": "center"
          ],
          [
            "text": "C",
            "alignment": "right"
          ]
        ], [
          [
            "text": "D",
            "alignment": "right"
          ],
          [
            "text": "E",
            "alignment": "center"
          ],
          [
            "text": "F",
            "alignment": "left"
          ]
        ]],
      "headerColumn": true,
      "headerRow": true
    ],
    [
      "type": "table",
      "rows": [[["text": "A"], ["text": "B"], ["text": "C"]], [["text": "D"], ["text": "E"], ["text": "F"]]]
    ],
    [
      "type": "table",
      "rows": [[["text": "A"], ["text": "B"], ["text": "C"]], [["text": "D"], ["text": "E"], ["text": "F"]]],
      "headerRow": false
    ],
    [
      "type": "columns",
      "columns": [["blocks": [
            [
              "type": "paragraph",
              "plaintext": "Marble Column 1 {{email}}"
            ]
          ]], ["blocks": [
            [
              "type": "image",
              "imageUrl": "https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg",
              "alt_text": "A picture of Barry Obama",
              "caption": "One Cool President",
              "captionAlignment": "center",
              "imageAlignment": "right",
              "title": "Barry O",
              "url": "https://www.whitehouse.gov/",
              "width": 75
            ]
          ]]]
    ],
    [
      "type": "advertisement",
      "opportunity_id": "d8dfa6be-24b5-4cad-8350-ae44366dbd4c"
    ],
    [
      "type": "image",
      "imageUrl": "https://cdn.britannica.com/89/164789-050-D6B5E2C7/Barack-Obama-2012.jpg",
      "alt_text": "A picture of Barry Obama",
      "caption": "One Cool President",
      "captionAlignment": "center",
      "imageAlignment": "right",
      "title": "Barry O",
      "url": "https://www.whitehouse.gov/",
      "width": 75
    ],
    [
      "type": "paragraph",
      "formattedText": [
        ["text": "This is going to be "],
        [
          "text": "a really, really awesome time ",
          "styling": ["bold"],
          "text_color": "#111111"
        ],
        [
          "text": "Are you ready for this?",
          "styling": ["italic", "bold", "strikethrough"],
          "highlight_color": "#fff3cd"
        ]
      ],
      "textAlignment": "left"
    ],
    [
      "type": "button",
      "href": "/subscribe",
      "text": "Subscribe",
      "alignment": "center",
      "size": "large",
      "target": "_blank"
    ],
    [
      "type": "button",
      "href": "/signup",
      "text": "Sign Up",
      "alignment": "right",
      "size": "small",
      "target": "_blank"
    ],
    [
      "type": "button",
      "href": "/",
      "text": "View Posts",
      "target": "_blank"
    ],
    [
      "type": "heading",
      "level": "4",
      "anchorHeader": true,
      "anchorIncludeInToc": true,
      "text": "This is my block!!!",
      "textAlignment": "right"
    ]
  ],
  "subtitle": "Contains lots of examples of each block type and the various settings you could use",
  "post_template_id": "post_template_00000000-0000-0000-0000-000000000000",
  "scheduled_at": "2024-12-25T12:00:00Z",
  "custom_link_tracking_enabled": true,
  "email_capture_type_override": "none",
  "override_scheduled_at": "2022-10-26T14:01:16Z",
  "social_share": "comments_and_likes_only",
  "thumbnail_image_url": "https://images.squarespace-cdn.com/content/v1/56e4ca0540261d39b90e4b18/1605047208324-PONGEYKEAKTMM1LANHJ5/1ED706BF-A70B-4F26-B3D5-266B449DDA8A_1_105_c.jpeg",
  "recipients": [
    "web": ["tier_ids": ["premium"]],
    "email": [
      "tier_ids": ["premium", "free"],
      "include_segment_ids": ["seg_6426b403-39f5-42bd-86e9-9533fb0099e7"],
      "exclude_segment_ids": ["seg_e34b4085-aef6-449f-a699-7563f915f852"]
    ]
  ],
  "email_settings": [
    "from_address": "from_address",
    "custom_live_url": "https://beehiiv.com",
    "display_title_in_email": true,
    "display_byline_in_email": true,
    "display_subtitle_in_email": true,
    "email_header_engagement_buttons": "email_header_engagement_buttons",
    "email_header_social_share": "email_header_social_share",
    "email_preview_text": "email_preview_text",
    "email_subject_line": "email_subject_line"
  ],
  "web_settings": [
    "display_subtitle_on_web": true,
    "display_thumbnail_on_web": true,
    "display_title_on_web": true,
    "hide_from_feed": true,
    "slug": "and-this-is-gonna-rock"
  ],
  "seo_settings": [
    "default_description": "default_description",
    "default_title": "default_title",
    "og_description": "OpenGraph description",
    "og_title": "Opengraph Title",
    "twitter_description": "Twitter Stuff",
    "twitter_title": "My Twitter Article"
  ],
  "content_tags": ["Obama", "Care", "Rocks", "Healthcare"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beehiiv.com/v2/publications/pub_00000000-0000-0000-0000-000000000000/posts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```