Sign inGet started

bird whatsapp keyword-rules create

Usage

Code example
bird whatsapp keyword-rules create [flags]

Description

Create a WhatsApp keyword rule
Replace the reply Bird sends for opt-out or opt-in, or add keywords of your own. Your rule takes precedence over Bird's at the same grain and keeps Bird's keywords unless you add more. A keyword Bird has bound to one operation cannot be reused for the other.
Build the request from flags, a JSON WhatsAppKeywordRuleCreate 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 whatsapp keyword-rules create --example

# the body it prints:
Code example
{
  "country": "US",
  "keywords": ["no more texts", "remove me"],
  "operation": "opt_out",
  "reply": "You're off the list. ACME Courier won't message you again.",
  "waba": "102290129340398"
}

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
--operationWhat Bird does when an inbound message matches the rule. - opt_out records that the sender no longer consents to receive any messages from your WhatsApp Business Account, including transactional ones. Typing the word is the person's own statement, so it covers everything, unlike WhatsApp's built-in marketing opt-out control, which stops marketing alone. - opt_in records that they consent again. A rule's operation is fixed once created, and a keyword belongs to exactly one operation, so a keyword Bird ships for opt_out cannot be reused for opt_in. Closed on the write side: an operation Bird does not answer is rejected here rather than stored as a rule that never fires. The read side is open, because Bird can gain an operation without a new API version. Possible values: opt_in, opt_out. (required; or in --body-file)
--countryThe country this rule applies in, as an ISO 3166-1 alpha-2 code. It matches the country of the person who messaged you, worked out from their phone number. Omit it to cover everyone, which is what Bird's own rules do.
--wabaLimit the rule to one WhatsApp Business Account, identified by its WhatsApp-issued account ID or by the waa_ ID Bird gives it. Either form resolves to the same account, and the rule stores and returns the WhatsApp-issued one. Omit it to cover every account in your workspace. The account must be one of yours.
--keywords <value>…Extra keywords to match, on top of the ones Bird already ships for this operation. Omit to keep Bird's keywords and change only the reply, including keywords Bird adds later. You cannot remove one of Bird's keywords, and a keyword Bird has bound to the other operation cannot be reused here.
--replyThe message to send back when a keyword matches. Omit it to send nothing.
--response-schemaPrint the fields this command returns, then exit
NameDescription
bird whatsapp keyword-rules deleteDelete a WhatsApp keyword rule
bird whatsapp keyword-rules getGet a WhatsApp keyword rule
bird whatsapp keyword-rules listList WhatsApp keyword rules
bird whatsapp keyword-rules updateUpdate a WhatsApp keyword rule