Skip to main content
The ThunderPhone API uses token-based authentication. All requests must include a valid authentication header.

Authentication Methods

Token Authentication

For API requests, include your token in the Authorization header:
Authorization: Token YOUR_API_TOKEN
curl https://api.thunderphone.com/v1/orgs/{org_id}/agents \
  -H "Authorization: Token YOUR_API_TOKEN"

Session Authentication

When using the ThunderPhone dashboard, authentication is handled via browser cookies (session auth). This is managed automatically by the web application.

Getting Your API Token

  1. Log into the ThunderPhone Dashboard
  2. Navigate to SettingsAPI Keys
  3. Click Create API Key
  4. Copy and securely store your token
Keep your API token secure. Never expose it in client-side code or public repositories.

Base URL

All API requests should be made to:
https://api.thunderphone.com/v1

ID Format

All resource IDs in the ThunderPhone API are integers (auto-incrementing primary keys).
{
  "id": 12,
  "name": "Customer Support Agent"
}

Health Check

Verify API connectivity:
curl https://api.thunderphone.com/v1/healthz
Response:
{"ok": true}

Error Responses

The API returns standard HTTP status codes:
Status CodeDescription
200Success
201Created
204No Content
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing token
403Forbidden - Insufficient permissions
404Not Found - Resource doesn’t exist
500Internal Server Error
Error responses include a message:
{
  "detail": "Authentication credentials were not provided."
}