MailDocs

Reference

API reference

Every endpoint, and which need a session.

Every HTTP endpoint of the app, read from its route files. Session means the request needs a signed-in session (the deployment passcode, or the app's own sign-in); Public endpoints answer anyone.

Note

Requests that change data must come from the app's own pages; send JSON unless an endpoint says otherwise.

/api/domains

Method Path Access What it does
GET /api/domains Session —
POST /api/domains Session Adds a domain to the catalog and reads who hosts its mail today, with its first mailboxes and (optionally) the passcode for mail.<domain>. Routing is not changed here: the mail server is set up by POST /api/domains/:id/server.
PATCH /api/domains/:id Session —
DELETE /api/domains/:id Session Removes the domain and its mailboxes from the catalog. Its messages stay; routing must be disconnected first.
POST /api/domains/:id/mailboxes Session Adds a named address (admin@, support@, …) to a domain.
POST /api/domains/:id/routing Session { action: "check" | "connect" | "disconnect" }. Each call handles one domain, so bulk runs stay within Worker limits.
POST /api/domains/:id/server Session { action: "setup" | "check" | "remove" } for the domain's mail server at mail.<domain>. One domain per call, so a bulk setup stays within Worker and API limits.
POST /api/domains/import Session Adds every zone in the Cloudflare account that is not on the Domains page yet. Routing is not changed.

/api/edit-auth

Method Path Access What it does
GET /api/edit-auth Session —
POST /api/edit-auth Session —
DELETE /api/edit-auth Session —

/api/items

Method Path Access What it does
GET /api/items Public Inventory endpoint read by subdomains.appneural.com. Mail is private, so the public inventory is only how many domains there are and whether each delivers here: no names, no row ids, no counts. It reads one small table, so anonymous calls cannot use up the D1

/api/mailboxes

Method Path Access What it does
PATCH /api/mailboxes/:id Session —
DELETE /api/mailboxes/:id Session Removes the address; later mail to it follows the domain's rule for unknown addresses.

/api/messages

Method Path Access What it does
GET /api/messages Public —
DELETE /api/messages Public Empties Trash: deletes the messages and their stored files for good.
GET /api/messages/:id Public —
PATCH /api/messages/:id Public —
DELETE /api/messages/:id Public Deletes a message for good, with its raw source, HTML body and attachments.
GET /api/messages/:id/attachments/:attachmentId Public Downloads an attachment. It is always sent as a download (never shown inline) with a sandbox CSP, so an HTML or SVG file in a message cannot run on this site.
GET /api/messages/:id/html Public The HTML body, for the sandboxed frame on the inbox page. ?remote=1 also loads remote images and styles; by default they are blocked, so opening a message does not tell the sender it was read.
POST /api/messages/:id/parse Public Reads a large header-only message in full. On Workers Free this can exceed the CPU limit; the message then stays header-only and its original .eml remains downloadable.
GET /api/messages/:id/raw Public The original message exactly as received, as an .eml file.

/api/send

Method Path Access What it does
GET /api/send Public —
POST /api/send Public —

/api/settings

Method Path Access What it does
GET /api/settings Session —
PATCH /api/settings Session { defaultForwardTo }: where mail goes when a domain has no forward address of its own.
POST /api/settings/destinations Session Adds a forward address to the account; Cloudflare emails it a link that must be clicked before forwarding works.

Other routes

Method Path Access What it does
GET /health Public Liveness, database and message storage check. The System Registry lists https://<host>/health for every catalog.

Pages in the app

Page What it shows
/ —
/activity What the email handler did with each message, so a missing message can be traced.
/domains —
/setup —
Last updated 2 November 2026