Skip to content

Inbox API

Base URL: https://api.maile.uk

All inbox endpoints require an Authorization: Bearer <token> header if the inbox has a password set. See Password Protection.

GET /inbox/:address

Query parameters

ParamTypeDefaultDescription
pagenumber1Page number
pageSizenumber20Results per page (max 100)
unreadbooleanfalseOnly return unread emails

Response

{
"emails": [
{
"id": "V1StGXR8_Z5jdHi6B-myT",
"inbox": "hello@maile.uk",
"fromAddress": "sender@example.com",
"toAddress": "hello@maile.uk",
"subject": "Welcome!",
"receivedAt": 1713600000000,
"size": 4096,
"read": false,
"r2Key": "hello@maile.uk/V1StGXR8_Z5jdHi6B-myT",
"htmlUrl": "https://r2.maile.uk/hello@maile.uk/V1StGXR8_Z5jdHi6B-myT.html",
"textUrl": null
}
],
"total": 1,
"page": 1,
"pageSize": 20
}
GET /inbox/:address/:id

Marks the email as read. Returns the same shape as the list item (HTML/text loaded directly from the public R2 URLs in htmlUrl / textUrl).

DELETE /inbox/:address/:id
{ "success": true }
DELETE /inbox/:address

Deletes all emails for the address from R2 and D1.

{ "success": true }