Authentication
All Aila API requests require authentication using an API key.
Getting Your API Key
- Navigate to Settings > Connections
- Scroll to the API Keys section
- Click Generate API Key
- Copy and store your key securely — it won't be shown again
You can generate multiple keys (e.g., one per environment) and revoke individual keys without affecting others.
Using Your API Key
Include your API key in the Authorization header as a Bearer token:
Authorization: Bearer YOUR_API_KEYExample
const response = await fetch('https://api.aila.com/v1/calls', {
headers: {
'Authorization': `Bearer ${process.env.AILA_API_KEY}`
}
});import requests
response = requests.get(
'https://api.aila.com/v1/calls',
headers={'Authorization': f'Bearer {os.environ["AILA_API_KEY"]}'}
)Key Permissions
API keys inherit the permissions of the user who created them. Keys created by an admin can access all organization data.
Security Best Practices
- Store keys in environment variables, never in source code
- Rotate keys periodically
- Use separate keys for development and production
- Revoke keys immediately if compromised
Revoking a Key
- Navigate to Settings > Connections
- Find the key in the API Keys section
- Click Revoke
Error Responses
If authentication fails:
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}HTTP 401 — API key is missing or invalid HTTP 403 — API key is valid but lacks permission for the requested resource
Next Steps
- Batch Upload — Upload multiple calls via API