API playground
The API playground is an interactive request builder inside the dashboard — a Stripe-style try-it console that works through the whole public API surface without leaving the browser. Pick an endpoint from the catalog, fill the fields, read the generated code in your language, hit Send, and inspect the response next to the snippet. It lives at Developer → API playground (/[locale]/developer/playground in the dashboard).
When to use it
Use the playground when you want to:- shape a real request against your own tenant before writing code — confirm the field names, the response shape, and the exact curl you will paste;
- smoke-test sandbox behavior (magic-number scenarios, validation errors, rate-limit headers) without wiring a script;
- hand a colleague a working snippet — the code panel renders the same request in six languages.
Prerequisites
- Role: the page is gated to
owner,admin, anddeveloperroles. - API key: at least one active key matching the mode you want to run in —
dv_test_…for sandbox,dv_live_…for live. The playground picks the first active key on your account that matches the current mode. With no matching key the Send button stays disabled; create one under Settings → API keys. - A sender for write endpoints:
POST /messagesneeds a number or sender in your tenant to sendfrom; sandbox does not relax sender validation, only delivery.
The three panes
The playground lays out in three panes:
The endpoint catalog is curated rather than generated from the full OpenAPI document — roughly the two dozen verbs that cover the first week of an integration, with field copy written for onboarding (“Recipient phone number in E.164”) rather than auto-extracted from the schema.
Worked example: send an SMS
The fastest way to learn the page is one full run of the best-exercised write endpoint.-
Open sandbox mode. Flip the Sandbox/Live toggle in the builder header to Sandbox. The status line at the bottom of the form should name a
dv_test_…key; if it says No matching API key for this mode, create a test key under Settings → API keys first. -
Pick the endpoint. In the left pane, under Messages, choose Send SMS (
POST /messages). -
Fill the form:
channel— leave it onsms(the dropdown coverssms,mms,whatsapp,rcs,viber,email).to—+15551234567. The help text under the field flags the sandbox behavior: change the trailing digit to9and the simulated delivery flips to a failed DLR.from—+15550100, the sandbox sender.body—Hi from Orbit!
-
Read the generated code. Switch the Code preview to your language. The cURL tab shows:
The key is masked to prefix + last four — the playground never prints a usable credential into the snippet or the history list.
-
Hit Send. The Response card appears with a green status badge, a duration in milliseconds, and a body carrying the new message id and its state. Below it, the rate-limit callout reads something like
95/100 remaining · resets in 42s. -
Force a simulated failure. Change
toto end in9and send again — the body now reports the message in a failed state, which is the shape your DLR handling must parse. Sandbox magic numbers lists every trailing-digit scenario. - Wrap up in history. Both runs are now in Recent requests with their status and duration. They stay in this browser only.
422 in live mode but succeed in sandbox, the response body names the field that live validation rejected — the playground surfaces that detail verbatim.
Sandbox vs live
The toggle in the builder header mirrors the dashboard-wide sandbox store: flip it to sandbox anywhere and the page follows. In sandbox mode the playground routes through yourdv_test_… key, so nothing is delivered to a real carrier and nothing is charged. In live mode it uses your dv_live_… key and the request is real.
The mode-vs-key pairing is enforced server-side: a request cannot sneak a live call through on a test key or vice versa — a mismatched pairing is refused before it reaches the endpoint.
What you send in sandbox mode is fully deterministic — the delivery outcome is chosen by the trailing digit of the recipient you send to (see Sandbox magic numbers). The playground is the fastest way to try one of those scenarios without writing a script.
Use the generated code in your codebase
The snippet panel is the point of the playground: it renders the request the way you would write it, on the base URL you actually send to.- cURL — an
X-API-Keyheader and the JSON body inline; paste it into a terminal. - Node, Python, Go, Ruby, PHP — the same request through the official SDK for that language, reading the key from
ORBIT_API_KEY(live) orORBIT_SANDBOX_KEY(sandbox).
Failure modes and errors
Request history
Every run is appended to a per-user history that lives in your browser’s localStorage only — the last 50 requests, with method, path, mode, status, and duration. It never reaches a server; clearing browser data or switching browsers starts fresh, and the Clear button empties it. The panel shows the latest dozen; older entries within the 50 cap fall off the view as new runs land. For the durable, workspace-wide view of API traffic — full request/response payloads retained for a year — use the Request Logs console. The playground history is the scratchpad; Request Logs is the record.See also
- Request Logs console — inspect the full payloads of the requests you made here
- Sandbox magic numbers — deterministic delivery outcomes keyed by trailing digit
- Developer Portal guide — the try-it endpoint, usage stats, key governance, and webhook debugging
- API Integration quickstart — take the request you built here into your codebase
- Authentication — key formats, roles, and rotation