Documentation
Sign inGet started

bird email templates duplicate

Usage

Code example
bird email templates duplicate <template-ref> [flags]

Description

Duplicate an email template
Copy a workspace template or a built-in system template into a new template with its own id and a single editable draft seeded from the source's current content. The copy starts unpublished and inherits the source's category, authoring format, and description. Its slug derives from the source's (for example welcome-email-copy) unless you supply slug; a slug already in use returns a conflict.
Build the request from flags, a JSON EmailTemplateDuplicate 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.

Examples

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

# the body it prints:
Code example
{
  "slug": "welcome-email-copy"
}

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
--slugThe copy's workspace-unique handle, and the stable alternative to the template ID when sending by template. Lowercase letters, numbers, hyphens, and underscores. Omit it to derive one from the source (for example, welcome-email-copy), with a numeric suffix if that slug is already taken. Two prefixes are rejected: bird_, reserved for Bird's built-in templates, and emt_, the template ID format, which a slug could never be told apart from. If you supply a slug that is already in use in the workspace, the request returns a conflict.
--response-schemaPrint the fields this command returns, then exit
NameDescription
bird email templates createCreate an email template and its first editable draft
bird email templates deleteDelete an email template
bird email templates getGet an email template
bird email templates listList email templates
bird email templates previewRender a template with sample values
bird email templates updateUpdate an email template