Sandbox Magic Numbers Playbook
The sandbox inventory that drives simulated traffic is spread across the sandbox test mode walkthrough, the connect your first channel tutorial, the first SMS end-to-end recipe, and the sandbox API cookbook. This playbook sandwiches the whole inventory into one recipe: the magic-number chart, failure-mode rehearsal, inbound injection, and the checklist that takes you from a test key to a live key. Run it as a single script before you go live.1. The big picture — a key that simulates without callers
Orbit sandbox activates on adv_test_sk_ API key (or a sandbox
organization, or the X-Test-Mode: true dashboard header). With that
signal, every send short-circuits before a provider is resolved: no
carrier is touched, no balance moves (cost_usd_cents: 0), and the
recipient’s trailing digit decides the simulated outcome. Nothing about
your request shape changes — you graduate by swapping the key, not the
code. The three activation signals are listed on the sandbox
overview.
Public-form sandbox keys (dv_test_pk_) reach sandbox endpoints only and
can be embedded in client-side test apps; rotation preserves the form, so a
public key never flips into a secret one.
2. The magic test numbers chart
Send to any E.164 recipient and the trailing digit selects the delivery scenario. Each scenario replays the same intermediate → terminal sequence a real carrier produces, delivered asmessage.status webhooks
to your sandbox webhook URL:
Every webhook carries
state_class (intermediate / terminal) and
is_terminal, matching the tags production stamps. The same catalog is
machine-readable from GET /api/v1/sandbox/numbers; the full semantics
stay canonical at magic numbers.
WhatsApp window-status injection
The same trailing-digit convention drives WhatsApp sends in the sandbox. For the reply side, inject a synthetic inbound withchannel: "whatsapp"
— the recipient “replies,” Orbit opens the 24-hour customer-service
window, and a follow-up free-form send then goes through. Check the state
your composer checks: GET /api/v1/messages/whatsapp/window-status. That
pair — inbound injection to open the window, then a free-form send — is
the whole template-window rehearsal, with no Meta account involved.
3. Recipe: connect WhatsApp inside the sandbox without Meta signup
The sandbox gives you a full WhatsApp loop — template send, simulated receipt, injected reply, free-form follow-up — before you run Meta’s embedded signup in production.- Mint a sandbox key with mode Test under Settings → API Keys
(
dv_test_sk_). - Bulk-provision a deterministic fictional number from the reserved
+1 555 01XXrange:
- Send a WhatsApp message from one provisioned number to a magic recipient — the trailing digit picks the receipt:
- Inject the synthetic reply (below), then send a free-form
type: "text"follow-up inside the window the injection opened.
window-status probe.
4. Perfecting the failure modes in the simulator
Rehearse the states your production handlers must survive. Aim each one at the magic number whose trailing digit emits exactly that state:
Sandbox receipts never mutate stored message state — the stored message
keeps its
test_sent status, and the receipts exist only on the webhook
stream. Your failure branch reads the same payload shape it would in
production.
5. Pre-conditioning inbound replies
Drive the receive side by pushing synthetic replies into your agent queue and inbox — no forged provider webhook, no handset:channel accepts sms, mms, or whatsapp; a repeated sender threads
into the open conversation (created_conversation: false). Use it to
rehearse auto-responders, STOP-keyword handling, inbox routing, and the
24-hour WhatsApp window from section 2. Endpoint bounds and error shapes
are in the cookbook.
6. Graduating production — test key to live key
The go-live checklist handles the cut; this is what remains intact and what changes:- Run the shared five-step gate —
GET /api/v1/sandbox/pre-launch-checklist— untilreadyForLaunch: true. It is callably with either key and always evaluates your live workspace, so CI and the dashboard agree. Each item is covered on the pre-launch checklist page. - Complete KYC and fund the balance — together they switch on live sending.
- Mint a live key (
dv_live_sk_) under Settings → API Keys and swap it in. The request bodies stay identical; the sandbox signal rides on the key, not the code. - Walk the human sign-off on the go-live checklist for numbers, webhooks, guardrails, and compliance.
provider: "sandbox" numbers belong to the sandbox workspace
only — re-register live numbers before cutting traffic. Both the sandbox
test-mode guide and the cookbook repeat these rules; this playbook keeps
them with the inventory they affect.
Related pages
- Sandbox and test mode — the end-to-end walkthrough this playbook sandwiches
- Sandbox API cookbook — request/response pairs for every route exercised here
- Sandbox dashboard walkthrough — the console equivalent
- Magic numbers reference — canonical digit-to-scenario semantics
- Pre-launch checklist — the five-step gate, item by item
- Connect your first channel — production WhatsApp signup (Recipe B) after the sandbox rehearsal