Documentation
Sign inGet started

bird email templates versions submit

Usage

代码示例
bird email templates versions submit <template-id> <version-id> [flags]

Description

Submit an email template version
Freeze the draft as a new immutable, numbered version and make it the version sends use; the draft stays editable. Every language the draft carries needs a subject and a body, and the draft's default language must be one of them: a submit is all or nothing, and the response names every problem across every language so you can fix them together. Send validate_only: true to run the same checks without freezing anything, and expected_revision to have the submit refused if the draft changed since you read it. A submit that would change nothing is refused. The response already reflects the final outcome, and a returned version is immediately live.
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

代码示例
# print the body shape (no credentials needed)
bird email templates versions submit --example

# the body it prints:
代码示例
{
  "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-onlyValidate the version without submitting it. Every language is checked and every problem reported, but nothing is frozen and no version is created. Give a validation run a different Idempotency-Key from the submit that follows it, or none at all: the two requests carry different bodies, so reusing one key 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 deleteDiscard the draft's changes
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