Documentation Index
Fetch the complete documentation index at: https://developer.kallglot.com/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
Every programmatic call uses an organization API key. Sign up at kallglot.com, open the Developer Portal, and create keys per environment (sk_live_* vs sk_test_*).
API Keys
Every API key belongs to a single organization.Key Types
| Type | Prefix | Usage |
|---|---|---|
| Live | sk_live_ | Production traffic |
| Test | sk_test_ | Test or sandbox traffic |
Why calls fail (401, 402, 403)
Typical gate checks: unknown or revoked keys, wrong live/test environment, inactive subscription, or exhausted API credits. See Errors when wiring retries.
Making Authenticated Requests
Use theAuthorization header with a Bearer token:
Request Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Preferred format: Bearer <api_key> |
X-API-Key | No | Alternative to Authorization |
Content-Type | Yes for JSON bodies | Use application/json for POST requests |
Idempotency-Key | Recommended on POST | Prevents duplicate writes on retry |
WebSocket Authentication
WebSocket connections use the session stream token returned byPOST /v1/sessions, not your API key.
That JSON body is WebSocket-only (no PSTN leg). For Twilio, Telnyx, or SIP, add
routing on POST /v1/sessions as documented in Create Session—do not use a nested provider object.Token Expiration
Stream tokens expire after 5 minutes. Thestream.expires_at field tells you exactly when the token expires. Token expiry is checked only when the WebSocket connects, so an already-connected stream stays active after that point.
API Key Permissions
API keys can be scoped to the smallest permission set your application needs:| Permission | Description |
|---|---|
sessions:read | Retrieve session details |
sessions:write | Create and end sessions |
recordings:read | Access recordings |
analysis:read | Retrieve analysis results |
analysis:write | Request session analysis |
webhooks:manage | Manage webhook endpoints |
Response Headers
Authenticated HTTP responses may include these headers:| Header | Description |
|---|---|
X-Request-ID | Stable request identifier for support and debugging |
X-RateLimit-Limit | Maximum requests allowed in the current rate-limit window |
X-RateLimit-Remaining | Requests remaining in the current rate-limit window |
X-RateLimit-Reset | Unix timestamp when the current rate-limit window resets |
X-API-Credits-Remaining | Remaining API credits for the organization |
X-API-Credits-Used | API credits used in the current billing period |
Authentication And Billing Errors
| Status | Code | Meaning |
|---|---|---|
401 | api_key_invalid | The API key is missing, malformed, or unknown |
401 | api_key_expired | The API key has expired |
401 | api_key_revoked | The API key has been revoked |
401 | api_key_wrong_environment | A test key was used against live, or vice versa |
403 | organization_inactive | The organization subscription is inactive |
402 | insufficient_api_credits | The organization has no API credits remaining |
403 | insufficient_permissions | The key lacks a required permission (scopes); this is unrelated to 402 (billing / credits exhaustion) |
Security Best Practices
Rotate keys regularly
Rotate keys regularly
Create new API keys periodically and revoke old ones to reduce exposure if a key is leaked.
Use environment variables
Use environment variables
Store API keys in environment variables or a secret manager, never in source control.
Separate test and live keys
Separate test and live keys
Live keys should only be used against the live API environment. Test keys should only be used in test or sandbox environments.
Monitor usage and credits
Monitor usage and credits
Watch the Developer Portal for unusual API activity, rate-limit pressure, and low API-credit balances.
Revoke compromised keys immediately
Revoke compromised keys immediately
If a key may have been exposed, revoke it immediately and replace it with a new scoped key.
See Error Codes for the full error catalog and Rate Limits for throughput limits and retry guidance.