Sign inGet Started

bird email blocks languages set

Usage

Code example
bird email blocks languages set <block-id> <language> [flags]

Description

Upsert a reusable block language

Replace one language's draft with a complete HTML section, sending the draft revision last read (0 adds the language), or copy a published revision back into the draft with from_revision_id. Saving never publishes. A language keeps the authoring mode of its first section, so a visual language refuses HTML content with 422.

Build the request from flags, a JSON EmailBlockLanguageUpsert 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 3 of 7 of "Author a reusable email section and link it into templates". Previous: bird email blocks validate. Next: bird email blocks publish.

Examples

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

# the body it prints:
Code example
{
  "fragment": {
    "fragment_html": "<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tbody><tr><td lang=\"en\" style=\"font-family: Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 20px; letter-spacing: normal; text-align: left; text-transform: none; color: #333333; margin: 0; padding: 16px;\"><p style=\"margin: 0;\">Your disclosure text.</p></td></tr></tbody></table>",
    "serializer_version": 2
  },
  "revision": 1
}

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
--revision <n>Draft revision last read, or zero to create a missing language. A concurrent change returns 409. (required; or in --body-file)
--source-revision-idPublished source-language revision this translation was made from. Accepted with fragment only; leaving it out clears the reference.
--from-revision-idPublished revision of this language to copy back into the draft, sent instead of fragment. Copying never publishes.
--response-schemaPrint the fields this command returns, then exit
NameDescription
bird email blocks languages deleteDelete a reusable block language
bird email blocks languages getGet a reusable block language
bird email blocks languages listList reusable block languages

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