API Documentation

Create temporary mailboxes and read incoming email over a simple REST API.

Get your API key See pricing

Authentication

Pass your API key in the Authorization header as a Bearer token, or in the X-API-Key header. Get a free key from your account page.

curl https://maildrop.cx/api/v1/me \
  -H "Authorization: Bearer md_your_api_key"

Endpoints

POST/api/v1/mailboxes

Create (claim) a mailbox. Optional JSON body: prefix (3-20 chars, a-z 0-9 _), suffix (one of the public domains). Returns the full address. Claimed mailboxes are readable only by your key.

GET/api/v1/mailboxes/{address}/messages

List messages for a mailbox you created. Query params: page (default 1), limit (max 50). Returns total count and message summaries.

GET/api/v1/messages/{id}

Fetch a single message: subject, sender, HTML content and attachment metadata.

GET/api/v1/me

Inspect your key: plan, usage today/this month, remaining quota, spending cap and pay-as-you-go balance.

# Create a mailbox
curl -X POST https://maildrop.cx/api/v1/mailboxes \
  -H "Authorization: Bearer md_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"prefix": "myinbox42", "suffix": "206969.xyz"}'

# {"address":"[email protected]","prefix":"myinbox42","suffix":"206969.xyz"}

# Poll for messages
curl "https://maildrop.cx/api/v1/mailboxes/[email protected]/messages" \
  -H "Authorization: Bearer md_your_api_key"

# Fetch one message
curl https://maildrop.cx/api/v1/messages/12345 \
  -H "Authorization: Bearer md_your_api_key"

Errors

Errors are returned as JSON with an error object containing a machine-readable code and a human-readable message.

{"error": {"code": "daily_quota_exceeded", "message": "Daily quota of 300 requests reached."}}
codeHTTP
missing_api_key401No key supplied in headers.
invalid_api_key401Key not found.
subscription_expired402Paid plan subscription inactive.
insufficient_balance402Pay-as-you-go balance empty.
key_disabled403Key was disabled in the dashboard.
mailbox_not_found404Mailbox does not belong to this key.
invalid_prefix422Prefix fails validation.
invalid_suffix422Suffix not in the public domain list.
address_taken409Address claimed by another key.
mailbox_limit_reached429Plan mailbox limit hit for the last 24h.
daily_quota_exceeded429Free plan daily quota reached.
monthly_quota_exceeded429Monthly plan quota reached.
spending_cap_reached429Your own monthly spending cap hit.

Quota state is exposed via X-RateLimit-Limit and X-RateLimit-Remaining response headers. When a quota is exhausted the API responds with HTTP 429.

Outils