← TempMail

API DOCS

Build on TempMail. Generate disposable inboxes, poll for incoming mail, and manage addresses — all over plain HTTPS, no API key required.

Base URL: https://mecx.shop

QUICK START

# 1. Create an inbox
curl "https://mecx.shop/api/generate"
# -> {"success":true,"email":"x7k2m9pq4w@pulseexchange.org",...}

# 2. Use the address anywhere, then poll for mail
curl "https://mecx.shop/api/emails?address=x7k2m9pq4w@pulseexchange.org"

Inboxes expire after 1 hour (extendable). Every /api/* route is mirrored under /api/v1/*. Timestamps are Unix milliseconds.

ENDPOINTS

GET/api/generate

Create a random inbox

Generates a fresh random disposable address. No API key needed.

PARAMETERS
domain string optional
Pick a domain (see /api/domains). Defaults to the primary domain.
EXAMPLE
curl "https://mecx.shop/api/generate"
RESPONSE
{
  "success": true,
  "email": "x7k2m9pq4w@pulseexchange.org",
  "domain": "pulseexchange.org",
  "expiresIn": 3600,
  "expiresAt": 1792377825648,
  "maxExpiresAt": 1792381425648,
  "isCustom": false
}
POST/api/generate

Create a custom inbox

Register an inbox with a username you choose (3-30 chars, a-z 0-9 . _ -). Returns 409 if taken.

BODY
{
  "customUsername": "myname",
  "domain": "pulseexchange.org"
}
EXAMPLE
curl -X POST "https://mecx.shop/api/generate" \
  -H "Content-Type: application/json" \
  -d '{"customUsername":"myname"}'
RESPONSE
{
  "success": true,
  "email": "myname@pulseexchange.org",
  "domain": "pulseexchange.org",
  "expiresIn": 3600,
  "expiresAt": 1792377825648,
  "maxExpiresAt": 1792381425648,
  "isCustom": true
}
GET/api/generate?domains=true

List available domains

Returns every domain currently accepting mail.

EXAMPLE
curl "https://mecx.shop/api/generate?domains=true"
RESPONSE
{
  "success": true,
  "domains": ["pulseexchange.org", "primehosts.net"]
}
GET/api/generate?check=<username>

Check username availability

See if a custom username is free on a domain before registering.

PARAMETERS
check string required
Username to check.
domain string optional
Domain to check on.
EXAMPLE
curl "https://mecx.shop/api/generate?check=myname"
RESPONSE
{
  "success": true,
  "username": "myname",
  "domain": "pulseexchange.org",
  "available": true
}
GET/api/inbox?address=<email>

Get inbox info

Fetch an inbox's details, expiry, and whether it can be extended.

PARAMETERS
address string required
Full inbox address.
EXAMPLE
curl "https://mecx.shop/api/inbox?address=x7k2m9pq4w@pulseexchange.org"
RESPONSE
{
  "success": true,
  "inbox": {
    "address": "x7k2m9pq4w@pulseexchange.org",
    "expiresAt": 1792377825648,
    "maxExpiresAt": 1792381425648,
    "domain": "pulseexchange.org"
  },
  "canExtend": true,
  "remainingExtendMinutes": 60
}
GET/api/emails?address=<email>

List inbox emails

Read the emails received by an inbox. Anyone with the address can read it - that's the point of temp mail.

PARAMETERS
address string required
Full inbox address.
id string optional
Fetch one email by ID.
search string optional
Search subject/sender/body.
trash string optional
Set to true to list trashed emails.
stats string optional
Set to true to get counts only.
EXAMPLE
curl "https://mecx.shop/api/emails?address=x7k2m9pq4w@pulseexchange.org"
RESPONSE
{
  "success": true,
  "emails": [
    {
      "id": "1792374225644-lgs0zhl27",
      "from_address": "noreply@example.com",
      "subject": "Verify your account",
      "date": 1792374225644,
      "read": false
    }
  ]
}
PATCH/api/inbox?address=<email>&action=extend

Extend inbox expiry

Push an inbox's expiry forward (up to its max). Inboxes live 1 hour by default.

PARAMETERS
address string required
Full inbox address.
action string required
Must be extend.
EXAMPLE
curl -X PATCH "https://mecx.shop/api/inbox?address=x7k2m9pq4w@pulseexchange.org&action=extend"
RESPONSE
{
  "success": true,
  "message": "Inbox extended",
  "expiresAt": 1792381425648
}
DELETE/api/inbox?address=<email>

Delete an inbox

Permanently delete an inbox and its emails.

PARAMETERS
address string required
Full inbox address.
EXAMPLE
curl -X DELETE "https://mecx.shop/api/inbox?address=x7k2m9pq4w@pulseexchange.org"
RESPONSE
{
  "success": true,
  "message": "Inbox deleted successfully"
}
GET/api/qrcode?email=<email>

Address QR code

Get a scannable QR code for an address. Useful for mobile handoff.

PARAMETERS
email string required
Full inbox address.
format string optional
dataurl (default) or svg.
EXAMPLE
curl "https://mecx.shop/api/qrcode?email=x7k2m9pq4w@pulseexchange.org&format=svg"

NOTES

  • No authentication — treat inbox addresses as public bearer tokens.
  • Inboxes expire after 1 hour by default; extend via PATCH up to the max.
  • Mail is received in real time over SMTP; poll /api/emails for new arrivals.
  • Errors return {"success": false, "error": "..."} with an HTTP 4xx/5xx status.