Developer Documentation
Integrate Aegis AI security features into your applications with our comprehensive API.
Authentication
All API requests require authentication using an API key. You can obtain your API key from the Aegis AI dashboard.
API Key Authentication
Include your API key in the request headers:
Authorization: Bearer YOUR_API_KEYEndpoints
The base URL for all API requests is: https://api.aegis.ai/v1
| Endpoint | Method | Description |
|---|---|---|
/wallets | GET | List all protected wallets |
/wallets/{wallet_id} | GET | Get details for a specific wallet |
/wallets | POST | Register a new wallet for protection |
/threats | GET | List detected threats |
/threats/{threat_id} | GET | Get details for a specific threat |
/refunds | POST | Initiate a refund process |
Rate Limits
To ensure the stability of our service, API requests are subject to rate limiting:
- Standard tier: 60 requests per minute
- Premium tier: 300 requests per minute
- Enterprise tier: Custom limits based on your needs
Rate limit information is included in the response headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1625176672Error Codes
The API uses standard HTTP status codes to indicate the success or failure of requests.
| Status Code | Description |
|---|---|
| 200 - OK | The request was successful |
| 400 - Bad Request | The request was invalid or cannot be served |
| 401 - Unauthorized | Authentication failed or not provided |
| 403 - Forbidden | The request is understood but has been refused |
| 404 - Not Found | The requested resource could not be found |
| 429 - Too Many Requests | Rate limit exceeded |
| 500 - Server Error | An error occurred on the server |
Code Examples
cURL
Register a new wallet for protection:
curl -X POST https://api.aegis.ai/v1/wallets \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"wallet_address": "xxTdpc6DLBz1R2xDfoereUnso7rXnaSMkGBi5oWpump",
"protection_tier": "premium",
"blockchain": "solana"
}'JavaScript
Get a list of detected threats:
const fetchThreats = async () => {
try {
const response = await fetch('https://api.aegis.ai/v1/threats', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
const data = await response.json();
console.log('Detected threats:', data);
return data;
} catch (error) {
console.error('Error fetching threats:', error);
}
};
fetchThreats();Need Help?
If you need assistance with API integration or have any questions, our developer support team is here to help.
Contact us at dev-support@aegis.ai