API Reference
Authentication

Authentication

All Aila API requests require authentication using an API key.

Getting Your API Key

  1. Navigate to Settings > Connections
  2. Scroll to the API Keys section
  3. Click Generate API Key
  4. 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_KEY

Example

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

  1. Navigate to Settings > Connections
  2. Find the key in the API Keys section
  3. 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