Sign inGet Started

bird email blocks publish

Usage

Code example
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

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

# the body it prints:
Code example
{
  "languages": [
    {
      "language": "en",
      "revision": 2
    }
  ]
}

Options

Request

NameDescription
--body-fileRead the JSON request body from this file; "-" reads stdin
--examplePrint a complete example request body, then exit
--dry-runPrint the resolved request without sending it, then exit
--idempotency-keyDeduplication key; a retry with the same key won't act twice

Options

NameDescription
--language <key=value>Languages to publish, each with the draft revision last read. Repeatable, one language=revision per entry. (required; or in --body-file)
--yesPublish 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-schemaPrint the fields this command returns, then exit
NameDescription
bird email blocks createCreate a reusable email block
bird email blocks duplicateDuplicate a reusable email block
bird email blocks getGet a reusable email block
bird email blocks listList reusable email blocks
bird email blocks updateUpdate a reusable email block
bird email blocks validateValidate a reusable email section

Continue with the documentation, guides and examples for this topic.