Skip to main content

How routing picks a sender

When you send a message without hardcoding a sender, Orbit resolves the from address through a fixed precedence chain. This page documents that chain, what each sender-pool strategy does, and how inbound (MO) rules route replies. Request and response schemas are owned by the Messaging API reference; this page covers routing behaviour only.

Precedence: what the platform checks first

On POST /api/v1/messages/sms, Orbit resolves the sender in this order. The first source that produces a sender wins: Three rules worth knowing up front:
  • sender_pool_id and from_extension are mutually exclusive; sending both returns 422.
  • Sending both from and sender_pool_id is an ambiguous request — the pool wins and the explicit from is silently ignored. Pass exactly one sender identity per request (the full interaction matrix is on Sender resolution).
  • On a messaging service with a country_sender_pools map, the recipient-country’s override pool is preferred before the service-level default pool — but only when you did not set sender_pool_id explicitly.

Sender pool resolution

A sender pool groups sender identities (E.164 numbers, short codes, alphanumeric sender IDs) behind a selection strategy. At send time the pool picks exactly one of its members: Each pool member accumulates a health tier from delivery outcomes, and the rotation scheduler auto-swaps a degraded member for a warmed replacement. Creating pools, previewing which sender a recipient would get, and reading health are covered in the Sender pools guide.

Inbound routing (MO)

Outbound picks a sender; inbound rules decide where a received message goes. Tenant-level inbound rules are evaluated in priority order (lower value first) and match on:
  • number — the destination DID the message arrived on
  • sender — the originating address
  • keyword — case-insensitive substring of the message body
  • regex — a regular expression tested against the body
The first enabled rule that matches dispatches to one of: a webhook (signed HTTPS POST), a queue, an inbox, a team, or an ivr keyword menu tree. When no rule matches, the message falls through to the default inbox and the message.received event. Manage rules under /api/v1/messages/inbound-routes. This tenant-level rule set sits above the per-DID inbound hooks you may also have configured: pools own the “which sender” decision, these rules own the “where the reply lands” decision.

One curl example per branch

Explicit sender (branch 1):
Sender pool (branch 3):
Messaging service fallback (branch 4 — the pool comes from the service):
Inbound rule (MO):
For the full request/response schema of the send endpoint, see the Messaging API reference.

See also