Returns the list of domains available for creating mailboxes.
curl -H "X-API-Key: YOUR_API_KEY" \ "https://alightmotionmail.web.id/api/domains"
{
"success": true,
"data": { "domains": ["alightmotionmail.web.id"] },
"meta": { "time": "..." }
}
JSON API for creating mailboxes and reading incoming messages. All endpoints require an API key.
health.
All authenticated requests must include your API key in the X-API-Key header.
X-API-Key: YOUR_API_KEY
curl -H "X-API-Key: YOUR_API_KEY" \ "https://alightmotionmail.web.id/api/stats"
401 with an error body.
Every response follows one of two shapes.
{
"success": true,
"data": { /* payload */ },
"meta": { "time": "2026-10-16T01:20:54+00:00" }
}
{
"success": false,
"error": "Invalid API key",
"code": "INVALID_KEY",
"meta": { "time": "2026-10-16T01:20:54+00:00" }
}
Returns the list of domains available for creating mailboxes.
curl -H "X-API-Key: YOUR_API_KEY" \ "https://alightmotionmail.web.id/api/domains"
{
"success": true,
"data": { "domains": ["alightmotionmail.web.id"] },
"meta": { "time": "..." }
}
Creates a random address using the pattern 5 letters + 4 digits and registers it automatically.
{
"success": true,
"data": { "address": "kfqmx2847@alightmotionmail.web.id" },
"meta": { "time": "..." }
}
Registers a specific address. Safe to call repeatedly — returns success even if the address already exists.
curl -X POST \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"address":"hello@alightmotionmail.web.id"}' \ "https://alightmotionmail.web.id/api/mailbox"
Returns the most recent emails for a mailbox, newest first. Up to 100 results, with total count in meta.
{
"success": true,
"data": {
"address": "hello@alightmotionmail.web.id",
"emails": [{
"id": "a1b2c3d4e5f60718",
"from_address": "sender@gmail.com",
"subject": "Hello",
"preview": "First 150 characters...",
"received_at": "2026-10-16 01:20:54",
"is_read": false,
"has_attachments": false
}]
},
"meta": { "total": 1, "limit": 100, "offset": 0, "time": "..." }
}
Full content of a single email including HTML body, plain text, and attachments. Marks the email as read.
{
"success": true,
"data": {
"email": {
"id": "a1b2c3d4e5f60718",
"from_address": "sender@gmail.com",
"to_address": "hello@alightmotionmail.web.id",
"subject": "Hello",
"body": "Plain text...",
"html": ",
"attachments": [],
"received_at": "2026-10-16 01:20:54",
"is_read": true
}
},
"meta": { "time": "..." }
}
Permanently deletes a single email. Returns 404 if the ID does not exist.
{
"success": true,
"data": { "deleted": 1 },
"meta": { "time": "..." }
}
Deletes every email in a mailbox. The mailbox itself is kept.
{
"success": true,
"data": { "deleted": 3 },
"meta": { "time": "..." }
}
Global counters for the service.
{
"success": true,
"data": { "total_emails": 42, "total_mailboxes": 17 },
"meta": { "time": "..." }
}
Public endpoint — no API key required. Useful for uptime monitoring.
{
"success": true,
"data": { "ok": true, "service": "mailbox-api" },
"meta": { "time": "..." }
}
address parameter missing.action value.End-to-end flow: generate, read, delete.
# Set your key once KEY="YOUR_API_KEY" BASE="https://alightmotionmail.web.id/api" # 1. Generate address ADDR=$(curl -s -H "X-API-Key: $KEY" "$BASE/generate" | jq -r .data.address) echo "Address: $ADDR" # 2. List emails curl -s -H "X-API-Key: $KEY" "$BASE/emails?address=$ADDR" | jq # 3. Read one email curl -s -H "X-API-Key: $KEY" "$BASE/email?id=ID" | jq # 4. Delete one email curl -X DELETE -H "X-API-Key: $KEY" "$BASE/email?id=ID" # 5. Clear inbox curl -X DELETE -H "X-API-Key: $KEY" "$BASE/emails?address=$ADDR"
const KEY = "YOUR_API_KEY"; const BASE = "https://alightmotionmail.web.id/api"; async function api(path, options = {}) { options.headers = Object.assign({ "X-API-Key": KEY, "Content-Type": "application/json" }, options.headers || {}); const r = await fetch(BASE + path, options); return r.json(); } // Generate const gen = await api("/generate"); const address = gen.data.address; // List const list = await api(`/emails?address=${encodeURIComponent(address)}`); console.log(list.data.emails);
import requests KEY = "YOUR_API_KEY" BASE = "https://alightmotionmail.web.id/api" H = {"X-API-Key": KEY} # Generate r = requests.get(BASE + "/generate", headers=H).json() address = r["data"]["address"] print(f"Address: {address}") # List emails r = requests.get(BASE + "/emails", params={"address": address}, headers=H).json() for e in r["data"]["emails"]: print(e["from_address"], e["subject"])