The Qomni API has two modes: live and test. The key you use decides
the mode: sk_agents_live_… or sk_agents_test_…. There is no separate environment, no other host and
no setting to turn on. It is the same API, with the same validation and the
same errors, on separate data and without consequences.
With a test key:
- no number is dialed and nothing is sent to anyone;
- nothing is billed;
- test data lives apart from live data. A live key never sees it, and the other way around.
Why it works this way
A separate test environment, with another host and another database, forces you to maintain two configurations and to trust that both behave the same. That is almost never true. Qomni uses the same code and the same host for both modes, and separates only the data. So what you test is exactly what will run in production. Going live is changing an environment variable.
What changes with a test key
| Resource | With a test key |
|---|---|
| Calls | No number is dialed. The magic numbers decide the call’s outcome. |
| Realtime sessions | They work the same as in live mode and end with billed_minutes: 0. |
Magic numbers
To test each branch of your code, in test mode a call to these numbers has a fixed outcome:
| Number | Outcome |
|---|---|
+15005550001 |
completed |
+15005550002 |
busy |
+15005550003 |
no-answer |
Any other number in test mode ends completed.
Limits
- Test mode is not a copy of your live data. It starts empty and only holds what you create with test keys.
- The rate limits are the same: 120 requests per minute per key.
- A test key does not become a live key. When you go to production, create a
livekey and revoke the test keys you no longer use. - Validation is identical. A
422in test will be a422in live.
See also
- API keys and authentication: the key decides the mode.
- Quickstart: your first call, in test mode.
- Rate limits: the same in both modes.