Developer API
Integrate anon.li directly into your applications using our secure REST APIs.
anon.li provides developer-friendly REST APIs for both email aliasing and encrypted file sharing. Build privacy-first applications with secure email forwarding and zero-knowledge file encryption.
Getting Started
1. Create an API Key
Generate an API key in your Dashboard. Your key will start with ak_ and should be kept secret. API keys are created and deleted from your signed-in dashboard session; an existing API key cannot create or delete other API keys.
2. Authenticate Requests
Include your API key in the Authorization header:
Authorization: Bearer ak_your_api_key_here
3. Choose Your API
Alias API
Create and manage email aliases programmatically. Forward emails to any inbox while protecting your real address.
Drop API
Upload and share end-to-end encrypted files. Zero-knowledge storage with automatic expiration and download limits.
Form API
Manage end-to-end encrypted forms for confidential intake. Schema-first JSON definitions; submissions decrypt only in your vault.
Base URL
All API endpoints are relative to:
https://anon.li/api/v1
Conventions
Every endpoint under /api/v1 follows the same contract. The one exception is POST /api/v1/aliases, which keeps the request and error shape Bitwarden's addy.io integration expects (see the Alias API).
Response envelope
A successful response carries the result in data:
{
"data": { "id": "cuid...", "email": "[email protected]" },
"meta": { "request_id": "req_1234567890abcdef" }
}
A list adds pagination to meta. has_more tells you whether another page exists:
{
"data": [{ "id": "..." }],
"meta": { "request_id": "req_1234567890abcdef", "total": 120, "limit": 50, "offset": 0, "has_more": true }
}
Every response, success or error, also carries the request ID in the X-Request-Id header. Include it when you contact support.
Field names
Request bodies, response fields and query parameters are snake_case. A request body with a field the endpoint doesn't define is rejected. Timestamps are ISO 8601 strings in UTC. Byte counts that can exceed 2^53 (storage totals, file sizes in lists) are decimal strings.
Pagination
Paginated lists take limit (1–100, default 50) and offset (default 0). An out-of-range value is a validation error, not silently clamped. Small, bounded collections (domains, recipients, API keys) return everything as one page.
Status codes
| Status | Meaning |
|---|---|
200 | Success. A DELETE that removed a resource answers { "id": "...", "deleted": true } |
201 | A resource was created |
400 | The request is invalid (see below) |
401 | Missing or invalid credentials |
402 | Your plan doesn't cover the request |
403 | Authenticated, but not allowed |
404 | The resource doesn't exist, or isn't yours |
409 | The request conflicts with the resource's current state |
410 | The resource is permanently unavailable |
429 | Rate limited; retry after Retry-After seconds |
503 | A dependency is unavailable; retry after Retry-After seconds |
Errors
Every error has the same shape:
{
"error": {
"message": "Validation failed",
"code": "VALIDATION_ERROR",
"details": [{ "field": "recipient_email", "message": "Invalid email address" }]
},
"meta": { "request_id": "req_1234567890abcdef" }
}
Branch on code; message is written for people and may change. When a request fails validation, message is Validation failed and details lists each problem with its field path (files.0.chunk_index); malformed JSON is reported against the field body.
When a plan limit refuses a request, details.upgrade says which limit and what to upgrade to:
{
"error": {
"message": "Random alias limit reached (10). Upgrade to add more.",
"code": "UPGRADE_REQUIRED",
"details": {
"upgrade": {
"scope": "alias_random",
"current_tier": "free",
"suggested_tier": "plus",
"current_value": 10,
"limit_value": 10
}
}
},
"meta": { "request_id": "req_1234567890abcdef" }
}
| Code | Status | Meaning |
|---|---|---|
VALIDATION_ERROR | 400 | The request is invalid; see details |
INVALID_REQUEST | 400 | The request doesn't apply to this resource |
UNAUTHORIZED | 401 | Missing or invalid API key, session or upload token |
UPGRADE_REQUIRED | 402 | A plan limit, or a team without an active Business subscription |
FORBIDDEN | 403 | Not allowed (team role, ban, wrong form password, ...) |
NOT_FOUND | 404 | Doesn't exist or isn't yours |
CONFLICT | 409 | Already exists, or a stale vault generation |
DROP_NOT_READY | 409 | The drop is still uploading |
DROP_DISABLED | 403 | The drop's owner disabled it |
DROP_EXPIRED | 410 | The drop expired |
DOWNLOAD_LIMIT_REACHED | 410 | The drop (or recipient) has no downloads left |
TAKEN_DOWN | 410 | Removed for a policy violation |
RATE_LIMITED | 429 | Too many requests |
INTERNAL_ERROR | 500 | Something went wrong on our side |
SERVICE_UNAVAILABLE | 503 | A dependency is unavailable |
A few endpoints add codes of their own, such as DNS_LOOKUP_FAILED (503) when domain verification can't reach DNS; their pages list them.
Security Features
- API Key Authentication - Secure Bearer token authentication
- Rate Limiting - Protection against abuse with per-endpoint limits
- Monthly API Quotas - API-key requests count against your Alias, Drop or Form monthly API quota; dashboard actions use separate abuse-prevention limits
- End-to-End Encryption - Drop files are encrypted client-side before upload
- Zero-Knowledge File Sharing - Drop keys stay client-side and do not reach our servers
- Vault-Wrapped Recovery - CLI clients can store only vault-wrapped Drop owner keys and encrypted Alias metadata
- Transient Email Forwarding - Alias forwards mail to your inbox instead of providing hosted mailbox storage
Rate Limits
Rate limits vary by endpoint. When you exceed one, the response is 429 with code RATE_LIMITED and these headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1699999999999
Retry-After: 3600
X-RateLimit-Reset is a Unix timestamp in milliseconds; Retry-After is in seconds. API-key requests also count against your plan's monthly API quota per product; Get Account reports it as limits.api_requests_per_month.
Need Help?
- Check the Alias API documentation for email aliasing
- Check the Drop API documentation for encrypted file sharing
- Check the Form API documentation for encrypted forms
- Check the Account API documentation for plan, usage and vault endpoints
- Connect AI agents (Claude, Cursor, etc.) via the MCP Server — OAuth, no API key paste required
- Contact support at [email protected]