Sign inGet Started

List SMS keyword rules

GET
/v1/sms/keyword-rules
const rules = await bird.smsKeywordRules.list({ country: "NL" });
for (const rule of rules.data) {
  console.log(rule.operation, rule.keywords);
}
Réponse200
{
  "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

countrystring

Keep 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.

numberstring

Keep 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_countrystring

The 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.

operationstring

Keep only rules for this operation. Omit for all of them.

Possible values (may grow over time): stop, start, help, info, confirm, custom

scopestring

Keep only default rules (system) or only the rules you created (workspace). Omit for both.

Possible values: system, workspace

Contenu de la réponse

data
array of object
obligatoire

The 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.

Afficher les attributs enfants

Poursuivez avec la documentation, les guides et les exemples sur ce sujet.