Authentication
Include your API key in the x-api-key header. Get your key from Dashboard.
bash
curl https://api.swiftinbox.xyz/inboxes \ -H "x-api-key: YOUR_API_KEY"
Base URL: https://api.swiftinbox.xyz
GET /health
No auth required.
bash
curl https://api.swiftinbox.xyz/health
json
{
"status": "ok",
"checks": { "database": "ok", "redis": "ok", "storage": "ok" },
"timestamp": "2026-07-01T13:10:49Z"
}GET /me
Returns current user or guest info. No auth needed for guest data.
bash
curl https://api.swiftinbox.xyz/me \ -H "x-api-key: YOUR_API_KEY"
json
{
"ip": "103.18.35.75",
"type": "user",
"plan": "rush",
"active_inboxes": 3,
"max_inboxes": 100
}POST /create
Creates one or more temporary inboxes.
Available domains:
homettown.onlineswiftinbox1.storemimuxyz.xyzsupporttown.shopoutlookinboxcc.shopzazawin.funnetonline.funonlinecc.sitezazamail.sitebash
curl -X POST https://api.swiftinbox.xyz/create \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"count": 1, "domain": "homettown.online"}'Body fields:
| Field | Type | Description |
|---|---|---|
| count | int | Number of inboxes (default 1) |
| domain | string | Specific domain |
| username | string | Custom username (count=1 only) |
| username_length | int | Random username length (3-25) |
json
{
"inboxes": [{
"email": "tw8avmrgui@homettown.online",
"domain": "homettown.online",
"encrypted": false,
"expires_at": "2026-07-01T01:36:27Z"
}]
}GET /inboxes
Lists all inboxes for the logged-in user.
bash
curl https://api.swiftinbox.xyz/inboxes \ -H "x-api-key: YOUR_API_KEY"
json
{
"inboxes": [{
"id": "9bb17884-...",
"email": "myinbox@homettown.online",
"domain": "homettown.online",
"active": true,
"expires_at": "2026-07-01T01:36:27",
"created_at": "2026-07-01T01:31:27"
}]
}GET /inbox/:email
Returns all messages in a specific inbox.
bash
curl "https://api.swiftinbox.xyz/inbox/myinbox@homettown.online" \ -H "x-api-key: YOUR_API_KEY"
json
{
"messages": [{
"id": "48f732e8-...",
"sender": "noreply@someservice.com",
"subject": "Your code",
"body": "Your code is 482910",
"body_html": "<p>Your code is 482910</p>",
"otp": "482910",
"attachments": [],
"received_at": "2026-07-01T00:44:11"
}]
}GET /message/:id
Returns a single message by its ID.
bash
curl "https://api.swiftinbox.xyz/message/48f732e8-..." \ -H "x-api-key: YOUR_API_KEY"
GET /attachment/:id
Downloads an attachment. Returns the raw file.
bash
curl "https://api.swiftinbox.xyz/attachment/398f17aa-..." \ -H "x-api-key: YOUR_API_KEY" \ -o document.pdf
GET /stream/:email
Real-time SSE stream. Pushes new messages as they arrive.
javascript
const source = new EventSource(
"https://api.swiftinbox.xyz/stream/myinbox@homettown.online",
{ headers: { "x-api-key": apiKey } }
);
source.onmessage = (e) => {
const msg = JSON.parse(e.data);
console.log("new mail:", msg.subject, msg.otp);
};Stream interval by plan: drop=2s, spark=1.5s, rush=1s, apex=0.5s
Pushed message shape matches GET /inbox/:email message format.
DELETE /delete-inboxes
Deletes inboxes by email list or oldest N.
bash
curl -X DELETE https://api.swiftinbox.xyz/delete-inboxes \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"emails": ["myinbox@homettown.online"]}'json
{
"message": "deleted 1 inbox(es)",
"deleted": ["myinbox@homettown.online"]
}Errors
401unauthorized403your ip is blocked / account suspended429rate limit exceeded500internal server error