Authentication

How to authenticate with the KaiCalls API, manage API keys, and understand scopes and rate limits.

Overview

Protected business API operations use a Bearer token in the Authorization header. Signup is public; key management requires the owner's dashboard session. Check each operation's security declaration in the public OpenAPI contract before authenticating.

API Key Format

KaiCalls API keys follow a prefixed format that identifies the environment at a glance:

Live keys: kc_live_<secret>

The only prefix issued today. Telecom operations use live infrastructure and consume the account's trial allowance or plan usage.

Test keys: kc_test_<...> Not yet available

A separate sandbox is not available yet. Use mocked responses in automated tests. A dedicated demo workspace still uses live services; agree on test destinations before placing calls or sending messages.

Keys are SHA-256 hashed before storage. The raw key is shown only once at creation — copy it immediately.

Authentication Header

For protected business API operations, include your API key using the Authorization header:

Authorization: Bearer kc_live_your_key_here

Creating API Keys

For an existing account, keys are created in the dashboard or via the session-authenticated /v1/keys endpoint. Both use the browser session — an existing API key can neither mint another one nor widen its own scopes.

Bootstrapping your first key needs neither a session nor a card. The public POST /v1/signup endpoint defaults to activation_mode: "otp", which returns a live key once the owner confirms the six-digit code emailed to them. That key is read-only unless you pass api_key_scopes in both OTP requests. Card capture belongs to the optional "payment" mode, not to key issuance.

New partners can follow the partner onboarding guide to get a referral code and request setup permissions during email-verified signup.

Example request using an API key:

bash
curl https://www.kaicalls.com/api/v1/agents \
  -H "Authorization: Bearer kc_live_abc123..."

Scopes

Every API key is granted a set of scopes that control which endpoints it can access. Unless specified at creation, new keys receive the read-only default set (workspaces:read, numbers:read, agents:read, communication-runs:read, calls:read, sms:read, webhooks:read, events:read) — request write scopes explicitly. Choose only the customer scopes your integration needs. Wildcard and operator-only grants are not available through self-service key creation.

ScopeDescription
workspaces:readList and view accessible workspaces
workspaces:writeCreate and update workspace details
agents:readList and view agents
agents:writeCreate and update agents
products:readRead business products and offers
products:writeCreate, update, and delete business products
knowledge:readRead business knowledge
knowledge:writeCreate, update, and delete business knowledge
billing:readRead balances and included usage
numbers:readList phone numbers
numbers:writeAssign or release phone numbers
communication-runs:readRead communication runs, jobs, and attempts
communication-runs:writeValidate, preview, create, pause, or cancel communication runs
calls:readList and view call records
calls:writeMake outbound calls
leads:readList and view leads
leads:writeCreate and update leads
sms:readView SMS messages and conversations
sms:writeSend SMS messages
emails:readView email queue
emails:writeSend emails
webhooks:readView webhook configuration
webhooks:writeConfigure or remove webhooks
events:readRead durable communication events and webhook deliveries
events:replayReplay or backfill durable communication events
lifecycle:writeRun lifecycle actions for provisioned workspaces
sdr:readRead SDR pipeline data
sdr:writeTrigger SDR actions
evals:readList eval scenarios and read run results
evals:writeCreate, update, delete, and run eval scenarios

Business Scoping

1

Keys can be scoped to a single business_id or left unscoped (granting access to all businesses the user owns).

2

All tenant-touching endpoints filter by business_id — a key scoped to Business A cannot read Business B data.

Key Management

Manage keys via the session-authenticated /v1/keys endpoints:

ActionMethodAuth
CreatePOST /v1/keysSession auth required
ListGET /v1/keysSession auth required
UpdatePATCH /v1/keysSession auth required
RevokeDELETE /v1/keys?id=<key_id>Session auth required

Keys can have an optional expires_at timestamp. Expired keys return 401 Unauthorized.

Rate Limits

EndpointLimit
/v1/signup5 requests per IP per hour
All list endpointsMax 100 results per request (except /v1/usage at 500)
/v1/transcriptsMax 50 results per request

See the Errors reference for details on error responses, or return to the full API reference.