Skip to main content

API Key Authentication

All requests to the ThreeTone API require authentication using an API key. The API key must be included in the request headers.

Header Format

Include your API key in the x-api-key header:
x-api-key: YOUR_API_KEY

Getting Your API Key

1

Sign Up

Create an account at dashboard.threetone.com
2

Navigate to API Keys

Go to SettingsAPI Keys in your dashboard
3

Generate New Key

Click Create New API Key and give it a descriptive name
4

Copy and Store

Copy your API key immediately - it will only be shown once!
Store your API keys securely and never commit them to version control. Consider using environment variables or a secure key management service.

Example Request

Here’s how to include authentication in your API requests:
curl --request GET \
  --url https://api.threetone.com/v1/voiceai/agents/list \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json'

Authentication Errors

If authentication fails, you’ll receive a 401 Unauthorized response:
{
  "detail": "Invalid or missing API key"
}

Common Issues

  • Missing API key: Ensure the x-api-key header is included
  • Invalid API key: Verify your key is correct and hasn’t been revoked
  • Expired API key: Generate a new key if yours has expired

Best Practices

Store API keys in environment variables instead of hardcoding them: bash export THREETONE_API_KEY="your_api_key_here"
Regularly rotate your API keys for enhanced security. You can have multiple active keys during transition periods.
Use different API keys for different environments (development, staging, production) to limit potential exposure.
Need help with authentication? Contact our support team at [email protected]