← Back to app

API Documentation

yes i used ai for the docs page because i didn't wanna make it myself

REST API for creating disposable inboxes and reading received mail.

Base URL

-

SMTP Port

-

Domains

Overview

This API lets you generate a disposable email address, then poll for messages delivered to it. Addresses are created under a randomly chosen subdomain of one of the domains listed above, e.g. ab@xy.example.com. Wildcard subdomains are accepted for mail delivery, so any address at *.<domain> will be routed correctly.

There is no authentication on these endpoints. Anyone with an EmailId can read or delete that inbox, so treat inbox IDs as unlisted rather than secret.

Endpoints

POST /api/email/create
Generates a new disposable email address and inbox.
Query Params
NameTypeRequiredDescription
CustomIdstringNoUse a specific local-part / inbox ID instead of a random one.
Response
{
  "Success": true,
  "Email": "ab3f9k@xy.example.com",
  "EmailId": "ab3f9k",
  "Domain": "example.com",
  "Subdomain": "xy",
  "CreatedAt": "2026-08-11T14:02:31.442Z"
}
GET /api/email/{EmailId}/messages
Lists every message received by an inbox, newest last.
Path Params
NameTypeDescription
EmailIdstringThe inbox ID returned by /api/email/create.
Response
{
  "Success": true,
  "EmailId": "ab3f9k",
  "Count": 1,
  "Messages": [ { ...see below... } ]
}
Message Object
FieldTypeDescription
IdstringUnique UUID for this message.
FromstringSender address.
TostringRecipient address.
SubjectstringDecoded subject line.
BodystringPlain-text body, if present.
HtmlstringHTML body, if present.
TimestampstringISO 8601 receipt time.
HeadersobjectRaw email headers as key/value pairs.
Returns 404 if EmailId doesn't exist.
GET /api/email/{EmailId}/messages/{MessageIndex}
Fetches a single message by its position in the inbox.
Path Params
NameTypeDescription
EmailIdstringThe inbox ID.
MessageIndexintegerZero-based index into that inbox's message list.
Response
{
  "Success": true,
  "Message": { ...single message object... }
}
Returns 404 if the inbox or index doesn't exist.
DELETE /api/email/{EmailId}
Deletes an inbox and all of its messages.
Response
{
  "Success": true,
  "Message": "Email deleted"
}
Returns 404 if EmailId doesn't exist.
GET /api/domains
Lists domains currently available for new addresses.
Response
{
  "Success": true,
  "Domains": ["example.com", ...]
}
GET /api/health
Basic service status and usage counts.
Response
{
  "Status": "ok",
  "Domains": [...],
  "ActiveEmails": 4,
  "TotalMessages": 11
}

Quick Example

Create an inbox, then poll it for new mail:

\# create an inbox
curl -X POST https://tempmail.folkvalley.xyz/api/email/create

\# poll for messages
curl https://tempmail.folkvalley.xyz/api/email/ab3f9k/messages