Back to Home
AEGIS AI

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_KEY

Endpoints

The base URL for all API requests is: https://api.aegis.ai/v1

EndpointMethodDescription
/walletsGETList all protected wallets
/wallets/{wallet_id}GETGet details for a specific wallet
/walletsPOSTRegister a new wallet for protection
/threatsGETList detected threats
/threats/{threat_id}GETGet details for a specific threat
/refundsPOSTInitiate 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: 1625176672

Error Codes

The API uses standard HTTP status codes to indicate the success or failure of requests.

Status CodeDescription
200 - OKThe request was successful
400 - Bad RequestThe request was invalid or cannot be served
401 - UnauthorizedAuthentication failed or not provided
403 - ForbiddenThe request is understood but has been refused
404 - Not FoundThe requested resource could not be found
429 - Too Many RequestsRate limit exceeded
500 - Server ErrorAn 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