TwinToneTwinToneAPI Docs

Get started

Authentication

All API requests authenticate with a Bearer API key:

Authorization: Bearer tt_live_xxxxxxxxxxxxxxxxxxxxxxxx

Keys are created and managed in the dashboard under Billing → API keys (also mirrored under Settings → API). There is no OAuth flow for the v1 API — keys are the only credential.

Key types

TypePrefixBehavior
Livett_live_Dispatches real agents, streams to real platforms, bills credits.
Testtt_test_Full request/response lifecycle with simulated status transitions. No agent dispatch, no billing. Use it to build your integration.

Test and live keys are interchangeable in every endpoint — the response shapes are identical, so swapping tt_test_tt_live_ is your entire go-live step.

Scopes

Keys carry least-privilege scopes, chosen at creation:

ScopeGrants
streams:readGET /streams, GET /streams/{id}
streams:writePOST /streams, DELETE /streams/{id}
analytics:readGET /analytics
webhooks:writePOST/GET/DELETE /webhooks

A request with an insufficient scope returns 403 { "error": { "code": "insufficient_scope" } }.

How we store keys

  • Keys are generated as tt_<env>_ + 24 cryptographically random characters.
  • We store only a SHA-256 hash + the last 4 characters. The full key is displayed once at creation and cannot be retrieved again.
  • Last used in the dashboard updates on every authenticated call.

Rotation & revocation

  • Revoke a key any time from the dashboard — it stops working immediately.
  • To roll a key without downtime: create a new key, deploy it, confirm traffic has moved (watch Last used on the old key), then revoke the old one.

Security rules

  1. Server-side only. Never ship a key in a browser bundle, mobile app, or client-side code. Anyone holding a live key can start billable streams.
  2. One key per service. If a key leaks, you know exactly which system to fix.
  3. Store keys in a secrets manager (1Password, Doppler, Vercel env vars) — never in git.
  4. If you believe a key has leaked, revoke it first, investigate second.

Was this page helpful?