List SMS keyword rules
/v1/sms/keyword-rulesconst rules = await bird.smsKeywordRules.list({ country: "NL" });
for (const rule of rules.data) {
console.log(rule.operation, rule.keywords);
}rules = client.sms_keyword_rules.list(country="NL")
for rule in rules.data:
print(rule.operation, rule.keywords)rules, err := client.SmsKeywordRules.List(context.Background(), bird.SmsKeywordRulesListParams{
Country: "NL", // omit for every country Bird's catalogue covers, plus your own rules
})
if err != nil {
log.Fatal(err)
}
for _, rule := range rules.Data {
fmt.Println(rule.Operation, rule.Keywords)
}$rules = $bird->smsKeywordRules->list(['country' => 'NL']);
foreach ($rules->getData() ?? [] as $rule) {
echo $rule->getOperation(), ' ', implode(',', $rule->getKeywords() ?? []), PHP_EOL;
}bird sms keyword-rules listcurl -X GET "https://us1.platform.bird.com/v1/sms/keyword-rules" \
-H "Authorization: Bearer $TOKEN"{
"data": [
{
"id": "skw_01krdgeqcxet5s7t44vh8rt9mg",
"scope": "system",
"operation": "stop",
"country": "NL",
"language": "fr",
"number": "+18005551234",
"keywords": [
"pizza",
"menu"
],
"effective_keywords": [
"stop",
"stoppen",
"afmelden"
],
"reply": "You have been unsubscribed and will receive no further messages.",
"reply_suffix": "Msg&data rates may apply. Reply STOP to unsubscribe.",
"reply_disabled_at": "2026-08-12T09:00:00Z",
"mandatory": true,
"created_at": "2026-08-12T09:00:00Z",
"updated_at": "2026-08-12T09:00:00Z"
}
]
}
Returns the default and workspace keyword rules that apply to inbound messages, most specific first. Where the default catalog covers a country, opt-out, opt-in, and help keywords work without setup.
Use the filters to narrow the full, unpaginated list. Set scope=system for default rules only. Set number for rules in evaluation order, and add from_country to account for the sender's country.
Default coverage varies by country. If a country has no default rules, the service does not recognize keywords, send replies, or record opt-outs there. You can add custom keywords for that country. Opt-out, opt-in, and help rules require default coverage.
Paramètres de requête
countrystringKeep only rules that apply in this country, as an ISO 3166-1 alpha-2 code. Omit for every country the default catalog covers, plus your own rules.
numberstringKeep only the rules that apply to this number of yours, in E.164 format or as a short code, ordered the way they are applied to an inbound message.
from_countrystringThe country a sender is messaging from, as an ISO 3166-1 alpha-2 code. Use it with number to see what someone in that country gets, which can differ from what a local sender gets. Ignored without number.
operationstringKeep only rules for this operation. Omit for all of them.
Possible values (may grow over time): stop, start, help, info, confirm, custom
scopestringKeep only default 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 defaults 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.