List WhatsApp keyword rules
/v1/whatsapp/keyword-rulesconst rules = await bird.whatsapp.keywordRules.list({ operation: "opt_out" });
for (const rule of rules.data ?? []) {
console.log(rule.scope, rule.effective_keywords);
}rules = client.whatsapp.keyword_rules.list(operation="opt_out")
for rule in rules.data or []:
print(rule.scope, rule.effective_keywords)rules, err := client.Whatsapp.KeywordRules.List(context.Background(), bird.WhatsappKeywordRulesListParams{
Operation: "opt_out", // omit for both operations, Bird's rules and your own
})
if err != nil {
log.Fatal(err)
}
for _, rule := range rules.Data {
fmt.Println(rule.Scope, rule.EffectiveKeywords)
}$rules = $bird->whatsapp->keywordRules->list(['operation' => 'opt_out']);
foreach ($rules->getData() ?? [] as $rule) {
echo $rule->getScope(), ' ', implode(',', $rule->getEffectiveKeywords() ?? []), PHP_EOL;
}bird whatsapp keyword-rules listcurl -X GET "https://us1.platform.bird.com/v1/whatsapp/keyword-rules" \
-H "Authorization: Bearer $TOKEN"{
"data": [
{
"id": "wkr_01krdgeqcxet5s7t44vh8rt9mg",
"scope": "workspace",
"operation": "opt_out",
"country": "US",
"waba": "102290129340398",
"keywords": [
"no more texts",
"remove me"
],
"effective_keywords": [
"stop",
"unsubscribe",
"optout",
"no more texts",
"remove me"
],
"reply": "You're off the list. ACME Courier won't message you again.",
"created_at": "2026-09-15T10:04:00Z",
"updated_at": "2026-09-15T10:04:00Z"
}
]
}
Returns the keyword rules that apply to inbound messages, most specific first. Bird's own rules are included, so opt-out and opt-in work on every inbound-capable number before you configure anything.
Use the filters to narrow the full, unpaginated list. Set scope=system for Bird's rules only, or scope=workspace for the ones you created.
Paramètres de requête
countrystringKeep only rules that apply to someone messaging from this country, as an ISO 3166-1 alpha-2 code. Omit for every rule, whichever country it covers.
wabastringKeep only the rules that apply to this WhatsApp Business Account of yours, identified by its WhatsApp-issued account ID or by the waa_ ID Bird gives it. Either form finds the same rules.
operationstringKeep only rules for this operation. Omit for all of them. Open on the same terms as the response, so an operation Bird gains later can be filtered for without a client update; one Bird does not answer matches nothing rather than failing.
Possible values (may grow over time): opt_in, opt_out
scopestringKeep only Bird's own rules (system) or only the rules you created (workspace). Omit for both.
Possible values: system, workspace
Contenu de la réponse
dataThe keyword rules that apply to your workspace, Bird's own included. Ordered most specific first, so the first rule whose keywords match an inbound message is the one that runs. The set is small and returned in full; this list is not paginated.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet.