Sign inGet Started

bird email blocks validate

Usage

Code example
bird email blocks validate [flags]

Description

Validate a reusable email section

Check an unsaved section against the rules publication applies: its structure and the content cell's typography, balanced Liquid, and, for a caller with contact read access, registered contact properties. Without that access no property verdict is returned, and publication still refuses an unregistered or archived property. Returns the plain text derived from it, or 422 naming each field to correct. Saves nothing; each call computes a fresh result.

Build the request from flags, a JSON EmailBlockFragmentValidationRequest 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 2 of 7 of "Author a reusable email section and link it into templates". Previous: bird email blocks create. Next: bird email blocks languages set.

Examples

Code example
# print the body shape (no credentials needed)
bird email blocks validate --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
  },
  "language": "en"
}

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
--languageA language tag in BCP-47 form, for example en or pt-BR. (required; or in --body-file)
--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 publishPublish a reusable email block
bird email blocks updateUpdate a reusable email block

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