---
title: "Publish a reusable email block"
canonical: "https://bird.com/docs/api/reference/publish-email-block"
---

# Publish a reusable email block

`POST /v1/email/blocks/{block_id}/publish`

Publishes the current drafts of the named languages, each with the draft `revision` you last read. All named languages publish together or none do. Saving a draft never publishes.

Templates that link the block in a published language use the new content for mail that starts afterwards, including broadcasts already scheduled. A message scheduled on its own keeps the content it was accepted with.

A draft saved after you read it returns a `409` `conflict_error`, and a draft with no unpublished changes or invalid section content returns a `422` `validation_error`. So does a publication that would remove the only unsubscribe link from a live marketing template; the error names up to ten of those templates.

A publication that makes live templates using the block require a new input the sender supplies returns a `409` `conflict_error` naming the inputs and up to ten templates. Unlike a stale draft, it asks for review: once those senders supply the inputs, repeat the same languages and revisions with `confirm` set to `true`, under a new idempotency key.

## Servers

- `https://{region}.platform.bird.com`: Regional API endpoint. Use the host for the region your organization is hosted in. Official Bird SDKs and the CLI select it automatically from your API key, so you rarely need to set it by hand.
  - `region`: `us1`, `eu1`. Default: `us1`. The region your organization's data is hosted in.

## Authentication

Use one authentication option:

- `BearerAuth`: HTTP bearer authentication. Pass the API key as a bearer token in the `Authorization` header. Workspace
keys use `bk_{region}_*`; organization master keys use `bm_{region}_*`.
The prefix identifies the region and selects the
API endpoint. Official Bird SDKs and the CLI derive the region from the key.

## Code samples

**TypeScript**

```ts
// Requires email_management:write permission in the target workspace.
const blockId = "ebl_01krdgeqcxet5s7t44vh8rt9mg";
const draft = await bird.email.blocks.languages.get(blockId, "en");
const submission = await bird.email.blocks.publish(blockId, {
  languages: [{ language: "en", revision: draft.revision }],
});
console.log(submission.status, submission.published_revisions);
```

Examples: [TypeScript](/docs/api/reference/publish-email-block.ts.md) · [Python](/docs/api/reference/publish-email-block.py.md) · [Go](/docs/api/reference/publish-email-block.go.md) · [PHP](/docs/api/reference/publish-email-block.php.md) · [CLI](/docs/api/reference/publish-email-block.cli.md) · [MCP](/docs/api/reference/publish-email-block.mcp.md) · [cURL](/docs/api/reference/publish-email-block.curl.md)

## Example response `200`

```json
{
  "id": "ebs_01krdgeqcxet5s7t44vh8rt9mg",
  "block_id": "ebl_01krdgeqcxet5s7t44vh8rt9mg",
  "status": "published",
  "languages": [
    {
      "language": "pt-BR",
      "draft_revision": 8,
      "candidate_revision_id": "ebr_01krdgeqcxet5s7t44vh8rt9mg"
    }
  ],
  "published_revisions": [
    {
      "language": "pt-BR",
      "id": "ebr_01krdgeqcxet5s7t44vh8rt9mg",
      "version_number": 3
    }
  ],
  "published_at": "2026-05-25T16:42:01Z",
  "created_at": "2026-05-25T16:42:01Z"
}
```

## Path parameters

- `block_id` (string, required): Block to read or edit.

## Header parameters

- `Idempotency-Key` (string, optional)

  Client-supplied key. On operations supporting request deduplication, a retained
  response is replayed for duplicate requests with the same key within the
  idempotency window (3 hours by default). This protection requires a workspace,
  organization, or staff-account scope. User-only and unscoped unauthenticated operations,
  streams, and operations with a separate replay contract do not use this
  response replay.

  On a supported operation, if idempotency protection is unavailable before execution, the API returns
  `503 IdempotencyUnavailable` (E01033) without executing this attempt. Retry with
  backoff using the same key and request. An operation that takes effect before
  its response is retained can still execute again on retry.

  Two distinct 409 errors signal misuse:

  - `request_in_progress` (E01004): The same key is currently being
    processed by a concurrent request. Wait briefly and retry. The lock expires within 30 seconds.
  - `idempotency_key_reuse` (E01005): The same key has already completed
    against a different request body or method. Generate a new key.

  Recommended key format is `<event-type>/<entity-id>` (for example `welcome-user/usr_abc123`).
- `X-Workspace-Id` (string, optional): Workspace context for the request. Required for dashboard authentication and master keys. Workspace keys and access tokens already identify their workspace; send that workspace or omit the header. A different one is rejected.
- `X-Organization-Id` (string, optional): Organization context for the request. Required for dashboard authentication. An API key or access token carries its own organization, so send either that organization or no header at all; a different one is rejected.

## Request body

- `languages` (array of object, required): Languages to publish, each with the draft revision last read.
- `languages.language` (string, required): A language tag in BCP-47 form, for example `en` or `pt-BR`.
- `languages.revision` (integer, required): Draft revision last read. A newer saved draft returns 409.
- `confirm` (boolean): Publish even though live templates that use this block will start requiring inputs this publication adds. Without it, such a publication returns 409 naming the inputs and templates.

## Response body

- `id` (string, required)
- `block_id` (string, required)
- `status` (string, required)

  Where a block change is in its lifecycle. `published` means its revisions are live. New values may be added; treat an unknown value as not yet live.

  Possible values (may grow over time): `published`
- `languages` (array of object, required): Each included language, the draft revision it was taken from, and the snapshot frozen for it.
- `languages.language` (string, required): A language tag in BCP-47 form, for example `en` or `pt-BR`.
- `languages.draft_revision` (integer, required): Draft revision this snapshot was taken from.
- `languages.candidate_revision_id` (string, required): Immutable snapshot of the draft at that revision.
- `published_revisions` (array of object, required): The revisions that became live when this change was published.
- `published_revisions.language` (string, required): A language tag in BCP-47 form, for example `en` or `pt-BR`.
- `published_revisions.id` (string, required)
- `published_revisions.version_number` (integer, required): Publication number within this block language.
- `published_at` (string, required)
- `created_at` (string, required)

## Related resources

- [Should I use a Bird SDK or call the API directly?](/explained/platform/should-i-use-an-sdk-or-call-the-api-directly) (answer)
- [Build your first integration](/learn/paths/integration) (course)
- [Send your first email](/docs/get-started/send-your-first-email) (docs)

[Get an implementation brief](/learn/workspace?topic=api-basics)
