bird whatsapp send
Usage
Contoh kode
bird whatsapp send [flags]Description
Send a WhatsApp template message to one recipient.
Sending is outbound and irreversible: it reports "accepted", not "delivered" —
read the message back with "bird whatsapp get" to confirm delivery. Bird
selects the sender number from the template's category. Templates are currently
the only supported content type, so every send needs one (browse them with
"bird whatsapp templates list").
Build the request from flags, a JSON WhatsAppMessageSendRequest 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
Contoh kode
# print the body shape (no credentials needed)
bird whatsapp send --example
# the body it prints:Contoh kode
{
"template": {
"components": [
{
"parameters": [
{
"text": "1234",
"type": "text"
}
],
"type": "body"
},
{
"parameters": [
{
"text": "1234",
"type": "text"
}
],
"type": "button"
}
],
"language": "en",
"name": "bird_otp"
},
"to": "+31612345678"
}Contoh kode
# send a template with body placeholders
bird whatsapp send --to +15551234567 --template bird_order_confirmation --language en --components '[{"type":"body","parameters":[{"type":"text","text":"A1B2C3D4"}]}]'
# preview the resolved request without sending
bird whatsapp send --body-file body.json --dry-runOptions
Routing
| Name | Description |
|---|---|
| --to | Recipient phone number in E.164 format (e.g. +15551234567) |
Template
| Name | Description |
|---|---|
| --template | The template to send, by its name (e.g. bird_otp) |
| --language | Language code of the template variant to send (e.g. en or pt_BR); omit when the template has a single language |
| --components | The values that fill the template's placeholders, as a JSON array (e.g. body/header/button component objects) |
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 get | Get a WhatsApp message |
| bird whatsapp list | List WhatsApp messages |
| bird whatsapp list-events | List events for a WhatsApp message |