bird whatsapp templates create
Usage
Exemple de code
bird whatsapp templates create <slug> [flags]Description
Create a WhatsApp template, optionally seeding its first draft
"slug" is the handle a send names the template by, for example "order_update".
It is fixed at creation, and WhatsApp's own template name derives from it. The
"bird_" prefix is reserved for Bird's built-in templates.
Nothing here reaches WhatsApp. What this returns is a draft, and a draft cannot
be sent: submit it with "bird whatsapp templates versions submit", and sends then
use the version that submit freezes.
Called without "languages", this creates the template with no draft. Open one
with "bird whatsapp templates versions create", then add content a language at a
time with "bird whatsapp templates versions languages set", which is also how you
edit it later. To seed content at creation instead, pass the whole JSON body with
--body-file: the "languages" object maps a BCP-47 tag to that language's
{components}, a shape no flag can express.
Build the request from the <slug> argument and flags, a JSON WhatsAppTemplateCreate body via
--body-file ("-" reads stdin), or both — an inline value 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 WhatsApp template and get it approved". Previous: bird whatsapp business-accounts list. Next: bird whatsapp templates versions create.
Examples
Exemple de code
# print the body shape (no credentials needed)
bird whatsapp templates create --example
# the body it prints:Exemple de code
{
"category": "utility",
"default_language": "en",
"description": "Sent when a customer's order ships.",
"languages": {
"en": {
"components": [
{
"example_parameters": [
{
"text": "A-4192",
"type": "text"
}
],
"text": "Your order {{1}} has shipped.",
"type": "body"
}
]
}
},
"name": "Order update",
"on_missing_language": "fallback",
"slug": "order_update",
"waba": "102290129340398"
}Exemple de code
# create the template, then author its English content
bird whatsapp templates create order_update --waba 102290129340398 --category utility --default-language en
# seed the first draft's content at creation
bird whatsapp templates create order_update --waba 102290129340398 --category utility --default-language en --body-file body.jsonOptions
Identity
| Name | Description |
|---|---|
| --waba | The WhatsApp Business Account to author this template on. It has to be one this workspace has connected; "bird whatsapp business-accounts list" shows them |
| --name | Display name shown wherever the template is listed. You can change it any time; defaults to the slug |
| --description | What the template is for, in your own words |
| --category | The category WhatsApp reviews the template under: utility, marketing or authentication. Fixed at creation. It is not what a send is priced at: WhatsApp applies its own category per language and may move one, and the price follows that |
Languages
| Name | Description |
|---|---|
| --default-language | The language a send uses when it names none, and the last resort when the language a send asks for is unavailable. It has to be one of the languages the draft holds |
| --on-missing-language | How a send behaves when it asks for a language this template does not carry: fail (default) or fallback |
| --language-source-required | Reject a send that does not name a language, instead of sending the default language |
Request
| Name | Description |
|---|---|
| --body-file | Read the JSON request body from this file; "-" reads stdin |
| --example | Print a complete example request body, then exit |
| --dry-run | Print the resolved request without sending it, then exit |
| --idempotency-key | Deduplication key; a retry with the same key won't act twice |
Options
| Name | Description |
|---|---|
| --response-schema | Print the fields this command returns, then exit |
Related
| Name | Description |
|---|---|
| bird whatsapp templates delete | Delete a message template |
| bird whatsapp templates duplicate | Duplicate a message template |
| bird whatsapp templates get | Get a message template |
| bird whatsapp templates list | List available message templates |
| bird whatsapp templates update | Update a message template |