Mailwurf

HTTP API

Plain HTTP under /api/v1. The TypeScript client is optional.

Every mailbox call except health needs your project API key:

Authorization: Bearer mw_live_…

or header X-Api-Key: mw_live_…. Inboxes and messages that do not belong to the key return 404. JSON errors look like {"error":"…"}.

Call the API at your Mailwurf origin, for example https://api.mailwurf.io. /v1 is an alias of /api/v1. /health is an alias of /api/v1/health. /llm and /llms.txt return this contract as Markdown and do not require a key.

The same contract is published as OpenAPI: browse the API Reference or download openapi.yaml.

Endpoints

MethodPathAuthSuccessNotes
GET/llmno200 markdownmachine-readable guide
GET/llms.txtno200 markdownsame as /llm
GET/api/v1/healthno200{"status":"ok"}
POST/api/v1/inboxesyes201empty body; custom address is rejected
GET/api/v1/inboxes?address=yes200lookup by address; address required
GET/api/v1/inboxes/{id}yes200404 if the inbox is not yours
DELETE/api/v1/inboxes/{id}yes204temporary inboxes only
GET/api/v1/inboxes/{id}/messagesyes200newest first; query subject, after
POST/api/v1/inboxes/{id}/messagesyes202send from this inbox; to, subject, text
GET/api/v1/inboxes/{id}/messages/waityes200server-side wait
GET/api/v1/messages/{id}yes200one message

Status: 400 bad JSON / missing query / invalid after / bad send body, 401 missing or wrong API key, 403 permanent inbox cannot be deleted here, 404 unknown inbox, message, or local send recipient, 408 wait timeout, 429 too many concurrent waits or sends, 500 server error.

Wait

GET /api/v1/inboxes/{id}/messages/wait

Keep one request open. Do not poll from the client.

QueryMeaning
timeoutmilliseconds. Default 15000. Max 120000. 0 = one lookup. Invalid → default
subjectcase-insensitive substring of Subject
aftermessage id; only later messages

Matching is oldest-first. If a match is already stored, it returns immediately. At most four waits may run at once per API key.

timeout=0 and no match → 404. Positive timeout and no match → 408. Too many concurrent waits → 429.

Examples

Create an inbox:

curl -s -X POST https://api.mailwurf.io/v1/inboxes \
  -H "Authorization: Bearer $MAILWURF_API_KEY"

Wait up to 15s for a subject containing Confirm:

curl -s "https://api.mailwurf.io/v1/inboxes/{id}/messages/wait?timeout=15000&subject=Confirm" \
  -H "Authorization: Bearer $MAILWURF_API_KEY"

Then use links[0] or otp from the body.

Send from an inbox to another Mailwurf address (or the internet):

curl -s -X POST https://api.mailwurf.io/v1/inboxes/{id}/messages \
  -H "Authorization: Bearer $MAILWURF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"other@mailwurf.io","subject":"Hello","text":"ping"}'

On this page