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
- Log into the ThunderPhone Dashboard
- Navigate to Settings → API Keys
- Click Create API Key
- 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
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:
Error Responses
The API returns standard HTTP status codes:
| Status Code | Description |
|---|
200 | Success |
201 | Created |
204 | No Content |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing token |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource doesn’t exist |
500 | Internal Server Error |
Error responses include a message:
{
"detail": "Authentication credentials were not provided."
}