Authentication
The Aegis API uses Bearer token authentication. Include your API key in the Authorization header of every request.
Getting Your API Key
- Sign in to the Aegis Dashboard
- Navigate to Settings → API Keys
- Click "Create API Key"
- Copy and securely store your key
WARNING
Never expose your API key in client-side code or public repositories. Use environment variables.
Using Your API Key
bash
curl https://api.aegis-dig.com/v1/verify/cpf \
-H "Authorization: Bearer aegis_live_xxxxxxxxxxxx"
API Key Types
| Environment | Prefix | Use Case |
|---|---|---|
| Production | aegis_live_ | Live verifications |
| Sandbox | aegis_test_ | Testing and development |
Error Responses
Authentication errors return HTTP 401:
json
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key",
"request_id": "req_xyz789"
}
}