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

# `bird email blocks publish`

## Usage

```bash
bird email blocks publish <block-id> [flags]
```

## Description

Publish a reusable email block

Publish the current drafts of the named languages together, each with the draft `revision` last read. Templates linking the block in a published language use the new content for mail that starts afterwards, including scheduled broadcasts; a message scheduled on its own keeps the content it was accepted with. A stale draft returns 409. No changes, invalid content, or losing the only unsubscribe link of a live marketing template returns 422. A publication adding an input that live templates' senders must supply returns 409 naming the inputs and templates; once senders supply them, repeat the same publication confirmed, under a new idempotency key.

Build the request from flags, a JSON EmailBlockPublish body via --body-file ("-" reads
stdin), or both — a flag overrides the matching body field. Run --example to
print a ready-to-edit body, or --dry-run to print the resolved request without
sending it.

## Procedure

Step 4 of 7 of "Author a reusable email section and link it into templates". Previous: bird email blocks languages set. Next: bird email templates versions languages get.

## Examples

```bash
# print the body shape (no credentials needed)
bird email blocks publish --example

# the body it prints:
```

```json
{
  "languages": [
    {
      "language": "en",
      "revision": 2
    }
  ]
}
```

## Options

#### Request

| Name                | Description                                                  |
| ------------------- | ------------------------------------------------------------ |
| `--body-file`       | Read the JSON request body from this file; "-" reads stdin   |
| `--example`         | Print a complete example request body, then exit             |
| `--dry-run`         | Print the resolved request without sending it, then exit     |
| `--idempotency-key` | Deduplication key; a retry with the same key won't act twice |

#### Options

| Name                     | Description                                                                                                                                                                           |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--language <key=value>` | Languages to publish, each with the draft revision last read. Repeatable, one language=revision per entry. (required; or in --body-file)                                              |
| `--yes`                  | 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-schema`      | Print the fields this command returns, then exit                                                                                                                                      |

## Related

| Name                                                                        | Description                       |
| --------------------------------------------------------------------------- | --------------------------------- |
| [`bird email blocks create`](/docs/cli/reference/email-blocks-create)       | Create a reusable email block     |
| [`bird email blocks duplicate`](/docs/cli/reference/email-blocks-duplicate) | Duplicate a reusable email block  |
| [`bird email blocks get`](/docs/cli/reference/email-blocks-get)             | Get a reusable email block        |
| [`bird email blocks list`](/docs/cli/reference/email-blocks-list)           | List reusable email blocks        |
| [`bird email blocks update`](/docs/cli/reference/email-blocks-update)       | Update a reusable email block     |
| [`bird email blocks validate`](/docs/cli/reference/email-blocks-validate)   | Validate a reusable email section |

## 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)
