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_keyThese 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.
429response beyond that. - Errors: JSON
{ statusCode, error, message }—401invalid key,402insufficient credits,404not found,429quota. - Pagination:
cursor&limitparameters, response{ items, nextCursor }.
Endpoints
- GETMessages from all your addresses — the route to poll. Filters
/pub/inboxq,filter,sort,mailboxId. - GETList of your addresses.
/pub/mailboxes - POSTCreates an address (debits credits). All fields are optional: empty body
/pub/mailboxes{}= 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 — otherwise403 ADDRESS_CHOICE_LOCKED(an empty body always works). - GETDetails of an address.
/pub/mailboxes/:id - DELETEDeletes an address.
/pub/mailboxes/:id - POSTFreezes (or
/pub/mailboxes/:id/freeze/unfreeze,/reactivate) an address. - GETMessages for an address.
/pub/mailboxes/:id/messages - GETA single message with its full body (marked as read).
/pub/mailboxes/:id/messages/:mid - DELETEDeletes a message.
/pub/mailboxes/:id/messages/:mid - GETCredit balance and account information.
/pub/account/pub/account/usage: 30-day usage. - GETDomains available to create an address. Reserved for accounts that have purchased credits.
/pub/domains
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.