Create an Apple Messages for Business routing rule
POST
/v1/amb/routing-rules
const result = await bird.amb.routingRules.create({
business_id: "abz_01krdgeqcxet5s7t44vh8rt9mg",
match_kind: "intent",
match_intent_id: "support",
queue: "support",
precedence: 0,
is_default: false,
match_group_id: null,
});
console.log(result);result = client.amb.routing_rules.create(business_id='abz_01krdgeqcxet5s7t44vh8rt9mg', match_kind='intent', match_intent_id='support', queue='support', precedence=0, is_default=False, match_group_id=None)
print(result)result, err := client.Amb.RoutingRules.Create(ctx, bird.AmbRoutingRulesCreateParams{BusinessID: "abz_01krdgeqcxet5s7t44vh8rt9mg", MatchKind: "intent", MatchIntentID: bird.Value("support"), Queue: "support", Precedence: bird.Ptr(0), IsDefault: bird.Ptr(false), MatchGroupID: bird.Null[string]()})
if err != nil {
log.Fatal(err)
}
fmt.Println(result)$bird->amb->routingRules->create((new Model\AMBRoutingRuleCreate())->setBusinessId('abz_01krdgeqcxet5s7t44vh8rt9mg')->setMatchKind('intent')->setMatchIntentId('support')->setQueue('support')->setPrecedence(0)->setIsDefault(false)->setMatchGroupId(null));bird amb routing-rules create \
--business-id abz_01krdgeqcxet5s7t44vh8rt9mg \
--is-default=false \
--match-intent-id order_status \
--match-kind intent \
--precedence 10 \
--queue billingcurl -X POST "https://us1.platform.bird.com/v1/amb/routing-rules" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"business_id": "abz_01krdgeqcxet5s7t44vh8rt9mg",
"match_kind": "intent",
"match_intent_id": "order_status",
"queue": "billing",
"precedence": 10,
"is_default": false
}'Risposta201
{
"created_at": "2026-05-20T09:14:52Z",
"updated_at": "2026-05-25T16:42:01Z",
"id": "arr_01krdgeqcxet5s7t44vh8rt9mg",
"business_id": "abz_01krdgeqcxet5s7t44vh8rt9mg",
"match_kind": "intent",
"match_intent_id": "order_status",
"match_group_id": "support",
"queue": "billing",
"precedence": 10,
"is_default": false
}
Creates a routing rule for one of your Apple Messages for Business brands. Set is_default to make it the rule that catches a conversation matching nothing else. A business can have only one default rule, and creating a second while one exists returns a 409.
Payload della richiesta
business_id
string
obbligatorio
The Apple Messages for Business brand this rule belongs to.
match_kind
string
obbligatorio
What a routing rule matches against the entry point that started the conversation.
- intent matches on the entry point's intent alone: match_intent_id is set and match_group_id is null.
- group matches on the entry point's group alone: match_group_id is set and match_intent_id is null.
- both matches only when the entry point carries the given intent and the given group together, so match_intent_id and match_group_id are both set. There are two match fields rather than one because both needs to carry an intent and a group at once.
Value: intent
match_intent_id
string
obbligatorio
The entry point intent to match, as sent in Apple's intentID. Required when match_kind is intent or both, and rejected when it is group.
queue
string
obbligatorio
The queue a matching conversation is filed into. Your console lists whichever values your rules use.
precedence
integer
Evaluation order among this business's rules. The highest-precedence rule a conversation matches wins. Omit it to default to 0.
is_default
boolean
Set to make this the rule that catches a conversation matching nothing else. A business can have only one; creating a second while one exists returns a 409.
business_id
string
obbligatorio
The Apple Messages for Business brand this rule belongs to.
match_kind
string
obbligatorio
What a routing rule matches against the entry point that started the conversation.
- intent matches on the entry point's intent alone: match_intent_id is set and match_group_id is null.
- group matches on the entry point's group alone: match_group_id is set and match_intent_id is null.
- both matches only when the entry point carries the given intent and the given group together, so match_intent_id and match_group_id are both set. There are two match fields rather than one because both needs to carry an intent and a group at once.
Value: group
match_group_id
string
obbligatorio
The entry point group to match, as sent in Apple's groupID. Required when match_kind is group or both, and rejected when it is intent.
queue
string
obbligatorio
The queue a matching conversation is filed into. Your console lists whichever values your rules use.
precedence
integer
Evaluation order among this business's rules. The highest-precedence rule a conversation matches wins. Omit it to default to 0.
is_default
boolean
Set to make this the rule that catches a conversation matching nothing else. A business can have only one; creating a second while one exists returns a 409.
business_id
string
obbligatorio
The Apple Messages for Business brand this rule belongs to.
match_kind
string
obbligatorio
What a routing rule matches against the entry point that started the conversation.
- intent matches on the entry point's intent alone: match_intent_id is set and match_group_id is null.
- group matches on the entry point's group alone: match_group_id is set and match_intent_id is null.
- both matches only when the entry point carries the given intent and the given group together, so match_intent_id and match_group_id are both set. There are two match fields rather than one because both needs to carry an intent and a group at once.
Value: both
match_intent_id
string
obbligatorio
The entry point intent to match, as sent in Apple's intentID. Required when match_kind is intent or both, and rejected when it is group.
match_group_id
string
obbligatorio
The entry point group to match, as sent in Apple's groupID. Required when match_kind is group or both, and rejected when it is intent.
queue
string
obbligatorio
The queue a matching conversation is filed into. Your console lists whichever values your rules use.
precedence
integer
Evaluation order among this business's rules. The highest-precedence rule a conversation matches wins. Omit it to default to 0.
is_default
boolean
Set to make this the rule that catches a conversation matching nothing else. A business can have only one; creating a second while one exists returns a 409.
Payload di risposta
created_at
string
obbligatorio
updated_at
string
obbligatorio
id
string
obbligatorio
Unique identifier for the routing rule.
business_id
string
obbligatorio
The Apple Messages for Business brand this rule belongs to.
match_kind
string
obbligatorio
What a routing rule matches against the entry point that started the conversation.
- intent matches on the entry point's intent alone: match_intent_id is set and match_group_id is null.
- group matches on the entry point's group alone: match_group_id is set and match_intent_id is null.
- both matches only when the entry point carries the given intent and the given group together, so match_intent_id and match_group_id are both set. There are two match fields rather than one because both needs to carry an intent and a group at once.
Possible values: intent, group, both
match_intent_id
nullable string
The entry point intent this rule matches, as sent in Apple's intentID. Set when match_kind is intent or both, null when it is group.
match_group_id
nullable string
The entry point group this rule matches, as sent in Apple's groupID. Set when match_kind is group or both, null when it is intent.
queue
string
obbligatorio
The queue a matching conversation is filed into. A queue is a label your console filters by rather than a resource you create ahead of time, so any value routes.
precedence
integer
obbligatorio
Evaluation order among this business's rules. The highest-precedence rule a conversation matches wins; rules tied on precedence are evaluated by their id.
is_default
boolean
obbligatorio
Whether this rule catches a conversation that matches nothing else. A business has at most one. A conversation created or reopened while none exists routes to an empty queue, which the console lists as unrouted.
Risorse correlate
Prosegui con la documentazione, le guide e gli esempi per questo argomento. Le risorse sono in inglese.
Comprendi il concettoShould I use a Bird SDK or call the API directly?Segui il percorso di apprendimentoBuild your first integrationGuida all'implementazioneSend your first email
Ottieni un brief di implementazione