Admin API
API key management for multi-tenant deployments.
POST /admin/api-keys
Create a new API key for a customer.
Request
{
"customer_id": "string",
"tier": "pilot|growth|enterprise",
"description": "string"
}customer_id
string
✅
Customer identifier
tier
string
✅
Pricing tier
description
string
❌
Key description
Response
{
"api_key": "athena_live_abc123...",
"customer_id": "cust_xyz",
"tier": "enterprise",
"rate_limit": 1000,
"created_at": "2025-12-25T10:00:00Z"
}Security: The api_key is shown only once. Store it securely before responding to the user.
Tier Rate Limits
pilot
100
150
growth
500
750
enterprise
1000
1500
Example
GET /admin/api-keys
List all API keys.
Response
Example
DELETE /admin/api-keys/:id
Revoke an API key immediately.
Response
Example
POST /admin/api-keys/:id/rotate
Rotate an API key with grace period.
Response
Grace Period: Old key remains valid for 24 hours to allow seamless migration.
Example
SDK Examples
JavaScript
Python
Best Practices
Rotate keys quarterly — Regular rotation limits exposure if a key is compromised
Use descriptive names — Include environment (prod/staging) in description
Monitor usage — Check
request_count_30dandlast_usedfor anomaliesSeparate environments — Use different keys for dev/staging/production
Revoke immediately — If a key may be compromised, revoke it right away
Audit Trail
All admin actions are logged:
api_key.created
Customer ID, tier, admin user
api_key.rotated
Key ID, admin user
api_key.revoked
Key ID, admin user, reason
Access audit logs via the Dashboard or contact [email protected].
Next: JavaScript SDK
Last updated