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.
List emails
Section titled “List emails”GET /inbox/:addressQuery parameters
| Param | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number |
pageSize | number | 20 | Results per page (max 100) |
unread | boolean | false | Only 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 email detail
Section titled “Get email detail”GET /inbox/:address/:idMarks 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 email
Section titled “Delete email”DELETE /inbox/:address/:id{ "success": true }Clear inbox
Section titled “Clear inbox”DELETE /inbox/:addressDeletes all emails for the address from R2 and D1.
{ "success": true }