Error Codes
The Kallglot API returns structured JSON errors with machine-readablecode and type fields.
In your integration, branch on HTTP status and
error.code. Log error.message and request_id when you need support.Avoid mixing up session fields: Create-session telephony belongs in
routing. If you copy the provider string from a response or a webhook payload into your POST /v1/sessions body, the request will not match the API. Use Create Session and Telephony providers as the source of truth for request JSON.HTTP Status Codes
Error Response Format
Useful Error Headers
Error Types
authentication_error
permission_error
invalid_request_error
conflict_error
not_found_error
rate_limit_error
api_error
Handling Errors
JavaScript
Python
Retry Guidance
WebSocket Close Codes
Common Issues
api_key_invalid
api_key_invalid
Cause: The API key is missing, malformed, or does not exist.What to do: Confirm the key starts with
sk_live_ or sk_test_, pass it in Authorization: Bearer ..., and verify that the key still exists in the Developer Portal.organization_inactive
organization_inactive
Cause: The key is valid, but the owning organization does not have an active subscription.What to do: Activate or renew the organization subscription before retrying API requests.
insufficient_api_credits
insufficient_api_credits
Cause: The organization has exhausted its API credits.What to do: Purchase more API credits in the Developer Portal and retry the request. Check
X-API-Credits-Remaining to monitor balances proactively.rate_limit_exceeded
rate_limit_exceeded
Cause: Too many requests were sent in the current window.What to do: Honor the
Retry-After header, reduce concurrency, and implement backoff for automated clients.session_not_found
session_not_found
Cause: The session ID does not exist or does not belong to the authenticated organization.What to do: Verify the
sess_... id and ensure you are using an API key for the same organization that created the session.sip_not_enabled
sip_not_enabled
Cause: The session requested SIP routing but SIP is not enabled for this organization.What to do: Go to the Developer Portal > Telephony and enable SIP in the SIP / PBX section. Configure your allowed IPs before enabling.
no_default_provider
no_default_provider
Cause: No telephony route could be resolved. You didn’t specify a phone number, connection ID, or SIP mode, and there’s no default provider connection configured.What to do: Either pass
routing.phone_number for a Kallglot-managed number, routing.connection_id for an external provider, or routing.type: "sip" for SIP mode. Alternatively, set a default provider connection in the Developer Portal.routing_failed
routing_failed
Cause: Telephony routing could not be resolved. This is a general routing error that includes specific guidance in the
docs_url field of the error response.What to do: Check the docs_url in the error response for specific guidance. Common causes include:- No provider connection configured (use
routing.connection_id) - Phone number not managed by your organization (verify in Developer Portal)
- Ambiguous routing with multiple connections (specify
routing.connection_id) - SIP mode requested but not enabled
connection_not_found
connection_not_found
Cause: The provider connection ID specified in
routing.connection_id doesn’t exist or has been deleted.What to do: Verify the connection ID in the Developer Portal > Telephony > External Provider Connections. Ensure the connection is active.