Documentation
Sign inGet started

bird sms keyword-rules create

Usage

Ejemplo de código
bird sms keyword-rules create [flags]

Description

Create an SMS keyword rule
Replace the default opt-out, opt-in, or help reply for one country, or add a custom keyword. A workspace rule takes precedence over the default for that country. Opt-out and opt-in keywords cannot be assigned to another operation.
Build the request from flags, a JSON SMSKeywordRuleCreate 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

Ejemplo de código
# print the body shape (no credentials needed)
bird sms keyword-rules create --example

# the body it prints:
Ejemplo de código
{
  "confirmed_self_managed": true,
  "country": "NL",
  "keywords": ["pizza", "menu"],
  "language": "fr",
  "number": "+18005551234",
  "operation": "stop",
  "reply": "You have been unsubscribed and will receive no further messages."
}

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
--operationAction taken when an inbound message matches the rule. stop unsubscribes the sender, start resubscribes them, help sends your support information, and custom sends the reply you configured. Built-in compliance rules fix the operation for stop, start, and help. This is an open enum. Accept unrecognized values. Known values: stop, start, help, custom (others may exist).
--countryThe country this rule applies in, as an ISO 3166-1 alpha-2 code. It matches a message two ways: one received on any of your numbers in this country, and one sent by a subscriber whose own number is in it, wherever they text you. Rules for the country a message arrives in always outrank rules for the country its sender is in; within each, your rule wins over Bird's keywords for that country. To confine a rule to one of your numbers, set number instead. Required for stop, start and help, because those replace what Bird ships for one country and a worldwide rule would replace every country's. Omit it only for custom, which then applies everywhere you send. Derived from number when you supply an E.164 number and leave this out; a short code carries no country, so a rule for one must name it.
--languageWhich language this rule replaces, in countries where Bird ships keywords in more than one. Required there and rejected elsewhere. Listing the country's rules shows whether it applies and which languages are available.
--numberNarrows the rule to one number you hold, in E.164 format or as a short code. Omit to cover every number you hold in the country. The number must be one of yours and able to receive messages.
--replyThe message to send back when a keyword matches, except on a confirm rule, which never sends one whatever this is set to. Set it to null together with confirmed_self_managed to send nothing at all.
--confirmed-self-managedSet this with reply: null to confirm you send this reply from your own system, which switches Bird's auto-reply off for the rule. Required to send no reply, and rejected when a reply is given, so the two can never disagree.
--response-schemaPrint the fields this command returns, then exit
NameDescription
bird sms keyword-rules deleteDelete an SMS keyword rule
bird sms keyword-rules getGet an SMS keyword rule
bird sms keyword-rules listList SMS keyword rules
bird sms keyword-rules updateUpdate an SMS keyword rule