Skip to content

Developer API

Automate your temporary addresses

A REST API to create email addresses on the fly and fetch messages from your servers. Key authentication, JSON responses, cursor pagination.

How it works

No subscription or API-specific billing: it exposes the same actions as the app and consumes the same prepaid credits. Creating and keeping an address costs credits (identical to the interface); listing and fetching messages is free. Top up with crypto from the dashboard.

Authentication

Generate a key from Account → Developer API (API access must be enabled on your account — contact the team). The token is shown only once. Send it on every request via the header:

Authorization: Bearer mk_your_key

These are server secrets — never expose them in browser code. A key can be revoked at any time from the dashboard.

Base & limits

  • Base URL: https://mktemp.cloud/v1/pub
  • Quota: 60 requests/min per key; creations/mutations also share the app’s 60/min-per-account cap. 429 response beyond that.
  • Errors: JSON { statusCode, error, message }401 invalid key, 402 insufficient credits, 404 not found, 429 quota.
  • Pagination: cursor & limit parameters, response { items, nextCursor }.

Endpoints

  • GET/pub/inbox
    Messages from all your addresses — the route to poll. Filters q, filter, sort, mailboxId.
  • GET/pub/mailboxes
    List of your addresses.
  • POST/pub/mailboxes
    Creates an address (debits credits). All fields are optional: empty body {} = randomly assigned domain and generated local part. Full body { domainId?, localPart?, subdomain?, randomSubdomain? }. Choosing the domain, local part or subdomain requires a real credit purchase — otherwise 403 ADDRESS_CHOICE_LOCKED (an empty body always works).
  • GET/pub/mailboxes/:id
    Details of an address.
  • DELETE/pub/mailboxes/:id
    Deletes an address.
  • POST/pub/mailboxes/:id/freeze
    Freezes (or /unfreeze, /reactivate) an address.
  • GET/pub/mailboxes/:id/messages
    Messages for an address.
  • GET/pub/mailboxes/:id/messages/:mid
    A single message with its full body (marked as read).
  • DELETE/pub/mailboxes/:id/messages/:mid
    Deletes a message.
  • GET/pub/account
    Credit balance and account information. /pub/account/usage: 30-day usage.
  • GET/pub/domains
    Domains available to create an address. Reserved for accounts that have purchased credits.

Example

The simplest path: create an address on a random domain, then fetch its messages.

# 1. Create an address — domain assigned at random, local part generated
curl -X POST https://mktemp.cloud/v1/pub/mailboxes \
  -H "Authorization: Bearer mk_your_key" \
  -H "Content-Type: application/json" -d '{}'

# 2. Poll received messages
curl -H "Authorization: Bearer mk_your_key" \
  "https://mktemp.cloud/v1/pub/inbox?limit=20"

To choose the domain (or the local part), list the domains and pass their id:

# Available domains
curl -H "Authorization: Bearer mk_your_key" \
  https://mktemp.cloud/v1/pub/domains

# Address on a specific domain, forced local part
curl -X POST https://mktemp.cloud/v1/pub/mailboxes \
  -H "Authorization: Bearer mk_your_key" \
  -H "Content-Type: application/json" \
  -d '{"domainId":"example.domainIdPlaceholder","localPart":"support"}'

Ready to start?

Create an account, get API access enabled, then generate your first key.