Test mode
Build and test your integration with simulated calls, no real dialling and no charges.
A test key (ohk_test_…) lets you build your whole integration without calling anyone or spending anything. Create one in the console under Account → API keys and choose Test as the environment. It works like a live key, except:
- Calls are simulated.
POST /v1/callsand scheduled calls are checked exactly like real ones (the agent, the number, the flow’s required variables), then a simulated call plays out instead of dialling. Nothing is charged. - Webhooks still fire. Simulated calls send the usual events, with
"livemode": falsein the payload, to your normal endpoints. Checklivemodeif you don’t want test events handled as real ones. - It can read, not change, your workspace. Test keys can read your real agents, contacts, campaigns and so on, but any other write is refused with
403 test_mode_read_only. - Test and live stay apart. A test key only sees its own simulated calls and scheduled calls, and a live key never sees them. They’re left out of analytics, billing and the console’s call lists.
How a simulated call plays out
| Time after placing | What happens | Webhook |
|---|---|---|
| 0 s | The call is ringing. |
|
| 2 s | It’s answered (in_progress). |
call.started |
| 10 s | It ends with a short placeholder transcript (endCause: "agent_ended", outcome: "simulated"). |
transcript.ready, outcome.captured, call.completed |
POST /v1/calls/:id/hangup ends it early (endCause: "api_hangup").
Magic numbers
Use these destination numbers to test other outcomes:
toNumber ends in |
Result |
|---|---|
0000 (e.g. +919812340000) |
Never answered. After 15 s: endCause: "no_answer", call.failed. |
1111 (e.g. +919812341111) |
Busy. After 3 s: endCause: "busy", call.failed. |
| anything else | Answered, as above. |
What isn’t simulated
Checks that depend on a real dial aren’t run in test mode: wallet balance, KYB, calling hours, do-not-call and frequency limits, and concurrency. Test them with a live key and a test agent. Test keys can’t open chat sessions, run campaigns, or change configuration.
The same Idempotency-Key used with a test key and a live key refers to two different requests.
Next: Versioning & changes →