API Documentation
REST API for programmatic access to your temporary inbox.
Authentication
Create an account and get a JWT token. Include the token in the Authorization header:
# Login to get a token
curl -X POST https://amail.my/api/token \
-H "Content-Type: application/json" \
-d '{"address":"[email protected]","password":"secret"}'
# Use the token for authenticated requests
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9...Rate Limits
25 requests per second per account. Exceeded returns 429 Too Many Requests.
Response Format
// Success
{ "success": true, "data": { ... } }
// With pagination
{ "success": true, "data": [...], "pagination": { "page":1, "limit":50, "total":42, "totalPages":1 } }
// Error
{ "success": false, "error": "Error message" }Endpoints
GETpublic
/api/domainsList available domains
POSTpublic
/api/accountsCreate a new inbox (address + password)
POSTpublic
/api/tokenGet JWT token (address + password)
GETauth
/api/messagesList messages (pagination: ?page=1&limit=50)
GETauth
/api/messages/:idGet single message with body + attachments
DELETEauth
/api/messages/:idDelete a message
Example: Full flow
# 1. Get available domains
curl https://amail.my/api/domains
# 2. Create account
curl -X POST https://amail.my/api/accounts \
-H "Content-Type: application/json" \
-d '{"address":"[email protected]","password":"secret"}'
# 3. Get JWT token
curl -X POST https://amail.my/api/token \
-H "Content-Type: application/json" \
-d '{"address":"[email protected]","password":"secret"}'
# 4. List messages
curl https://amail.my/api/messages \
-H "Authorization: Bearer <TOKEN>"
# 5. Get single message
curl https://amail.my/api/messages/<ID> \
-H "Authorization: Bearer <TOKEN>"
# 6. Delete message
curl -X DELETE https://amail.my/api/messages/<ID> \
-H "Authorization: Bearer <TOKEN>"