Documentation Index
Fetch the complete documentation index at: https://docs.aegisintent.xyz/llms.txt
Use this file to discover all available pages before exploring further.
API Authentication
Aegis uses a dual header authentication system to secure all API requests. Every authenticated endpoint requires both a Bearer token and the agent’s registered email address.How Authentication Works
Unlike traditional API key systems, Aegis enforces zero-trust dual-header validation. Both headers must be present and must match the same agent record in the database:Authorization: Your Bearer token issued during/v1/connect/completeX-Aegis-Email: The email address associated with that token
Getting Your API Token
Aegis does not use a dashboard for token management. Tokens are issued programmatically through the Connect API:Token Format
Aegis API tokens follow a consistent prefix format:- Live Token:
aegis_live_xxxxxxxxxxxxxxxx
tokenExpiresAt field in the connect response tells you the exact expiry timestamp.
Making Authenticated Requests
Include both headers on every request:Request Headers
Every API request should include these headers:| Header | Value | Required |
|---|---|---|
Authorization | Bearer <your_token> | Yes |
X-Aegis-Email | agent@example.com | Yes |
Content-Type | application/json | Yes (for POST requests) |
Idempotency-Key | UUID v4 | Required for financial actions |
X-Aegis-Nonce | Integer | Required for financial actions |
Idempotency
To prevent duplicate transactions, all financial action endpoints (/transfer, /pay, /bridge, /swap, /yield/deposit, /yield/withdraw, /wealth/limitOrder, /wealth/dca, /wealth/multiYield, /wealth/yield/synthra/withdraw) require an Idempotency-Key header. This must be a valid UUID v4.
If you send the same request twice with the same idempotency key, Aegis will return the original response without executing the action again.
Nonce System
Aegis tracks anactionNonce for every agent. This counter increments on every successful financial action. You must pass the current nonce value in the X-Aegis-Nonce header for financial mutations.
To check your agent’s current nonce:
Error Handling
Authentication Errors
If authentication fails, you’ll receive an error response:| Error Code | HTTP | Description |
|---|---|---|
UNAUTHORIZED | 401 | Bearer token is missing, malformed, not found, or revoked |
TOKEN_EXPIRED | 401 | Token has passed its 30-day expiry and was auto-revoked |
EMAIL_MISMATCH | 403 | X-Aegis-Email header does not match the token’s agent |
MISSING_EMAIL_HEADER | 400 | X-Aegis-Email header was not provided |
AGENT_SUSPENDED | 403 | The agent account has been deactivated by an administrator |
TOKEN_IP_NOT_ALLOWED | 403 | Request IP is not in the token’s allowed IP list |
Token Revocation
To revoke all active tokens for an agent (e.g., in case of a token leak), call the revoke endpoint:/v1/connect/start and /v1/connect/complete again to receive a new token.
Rate Limiting
Aegis enforces the following rate limits:| Scope | Limit |
|---|---|
Connect API (/v1/connect/*) | 10 requests per 10 minutes per IP |
Actions API (/v1/actions/*) | 120 requests per minute per agent |
Marketplace API (/v1/marketplace/*) | 90 requests per minute per agent |
Policy API (/v1/policy/*) | 60 requests per minute per agent |
429 Too Many Requests response.
Security Best Practices
Store Tokens Securely
Store Tokens Securely
- Never hardcode tokens in your application source code
- Use environment variables or a secrets manager
- Rotate tokens by calling
/v1/connect/revokeand Reonboarding
Use HTTPS Only
Use HTTPS Only
- All API requests must use HTTPS, The API will reject plaintext HTTP connections
One Agent, One Token
One Agent, One Token
For multi-agent architectures, provision separate agents (e.g.,
research-agent@company.com, trading-agent@company.com) rather than sharing
a single token. This gives you independent audit trails and spending policies
per agent.Revoke on Compromise
Revoke on Compromise
If you suspect a token has been leaked, immediately call
POST /v1/connect/revoke. This invalidates all active tokens for that agent instantly.Next Steps
Agent Connections
Deep dive into the onboarding lifecycle
Quickstart
Make your first payment in 5 minutes