Documentation
Sign inGet started

bird email templates versions submit

Usage

Code example
bird email templates versions submit <template-ref> <version-id> [flags]

Description

Submit an email template version
Freeze a complete draft as the new immutable live version. Every language needs a subject and body, and the default language must be present. Submission is all or nothing and reports every language error. Set validate_only: true to check without publishing, or pass expected_revision to reject a concurrent edit. An unchanged draft is rejected.
Build the request from flags, a JSON EmailTemplateSubmit 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 3 of "Author a template and make it sendable". Previous: bird email templates versions languages set.

Examples

Code example
# print the body shape (no credentials needed)
bird email templates versions submit --example

# the body it prints:
Code example
{
  "expected_revision": 3
}

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
--validate-onlyCheck the draft without actually submitting it. Every language gets checked and every problem gets reported back to you, but nothing is frozen and no new version gets created. Give a validation run its own Idempotency-Key, separate from the real submit that follows it. You can also send no key. The validation request and real submit have different bodies, so using the same key for both is rejected as key reuse.
--expected-revision <n>The draft revision you last read (from the template's revision field). A stale value returns a conflict so you can reload and retry.
--response-schemaPrint the fields this command returns, then exit
NameDescription
bird email templates versions deleteDelete an email template draft
bird email templates versions getGet an email template version
bird email templates versions listList email template versions
bird email templates versions rollbackRoll back an email template