Developer API Reference

API Overview & Authentication

Welcome to the developer API for tempmailto.com. Generate temporary email addresses, customize aliases, list messages, and automate QA workflows programmatically.

Base URL
https://tempmailto.com/api
Authentication

Pass your API key in the Authorization header (recommended: Authorization: Bearer YOUR_API_KEY) or X-API-Key header to avoid exposing credentials in URLs and server logs. Legacy URL-path authentication remains supported for existing integrations. Replace YOUR_API_KEY in the examples below with your key.

Authentication Parameter Type Location Example Placeholder
Authorization / X-API-Key string HTTP Header (Recommended) Bearer YOUR_API_KEY
apiKey string Legacy URL Path segment YOUR_API_KEY
GET Get Active Domains

Fetch list of all allowed domain names configured on the platform that can be used to generate temporary mailboxes.

GET https://tempmailto.com/api/domains/{apiKey}/{type}
Path Parameters
Parameter Type Status Description
apiKey string Required Your secret API authorization key.
type string Required Domain filter type. Accepted values: all, free, premium.
curl -X GET "https://tempmailto.com/api/domains/all" -H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
  "status": true,
  "data": {
    "domains": [
      {
        "domain": "tempmailto.com",
        "type": "Free"
      }
    ]
  }
}
POST Generate New Email

Instantly generate and register a new random temporary email address address.

POST https://tempmailto.com/api/emails/{apiKey}
Path Parameters
Parameter Type Status Description
apiKey string Required Your secret API authorization key.
curl -X POST "https://tempmailto.com/api/emails" -H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
  "status": true,
  "data": {
    "id": 142,
    "email": "[email protected]",
    "domain": "tempmailto.com",
    "ip": "127.0.0.1",
    "fingerprint": "f38b25...",
    "expire_at": "2026-06-20 13:45:00",
    "created_at": "2026-06-20 13:35:00",
    "email_token": "eyJpdiI..."
  }
}
POST Customize Email Address

Transition an existing email to a customized address with a specific username and active domain.

POST https://tempmailto.com/api/emails/{apiKey}/{email}/{username}/{domain}
Path Parameters
Parameter Type Status Description
apiKey string Required Your secret API authorization key.
email string Required The current temporary email address you want to change.
username string Required The customized alias/username prefix for the new address.
domain string Required One of the active domain names fetched from the active domains endpoint.
curl -X POST "https://tempmailto.com/api/emails/[email protected]/john_doe/tempmailto.com" -H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
  "status": true,
  "data": {
    "id": 143,
    "email": "[email protected]",
    "domain": "tempmailto.com",
    "ip": "127.0.0.1",
    "fingerprint": "f38b25...",
    "expire_at": "2026-06-20 13:45:00",
    "created_at": "2026-06-20 13:35:00"
  }
}
POST Delete Temporary Email

Instantly release and expire a temporary email address to delete all cached inbox data.

POST https://tempmailto.com/api/emails/{apiKey}/{email}
Path Parameters
Parameter Type Status Description
apiKey string Required Your secret API authorization key.
email string Required The active temporary email address to be removed.
curl -X POST "https://tempmailto.com/api/emails/[email protected]" -H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
  "status": true,
  "message": "Email has been successfully deleted."
}
GET Get Inbox Messages

Retrieve all message metadata and message summaries received inside the inbox of the specified temporary address.

GET https://tempmailto.com/api/messages/{apiKey}/{email}
Path Parameters
Parameter Type Status Description
apiKey string Required Your secret API authorization key.
email string Required The temporary email address to fetch the messages for.
curl -X GET "https://tempmailto.com/api/messages/[email protected]" -H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
  "status": true,
  "data": [
    {
      "id": "M2ZkMXQ1",
      "subject": "Verify your Account",
      "from": "Service Provider",
      "from_email": "[email protected]",
      "receivedAt": "2026-06-20 13:40:00",
      "is_seen": false,
      "html": true
    }
  ]
}
GET Get Message Detail

Retrieve the full HTML/plain text body content, sender fields, headers, and attachments list of a specific message ID.

GET https://tempmailto.com/api/messages/{apiKey}/message/{messageId}
Path Parameters
Parameter Type Status Description
apiKey string Required Your secret API authorization key.
messageId string Required The unique identifier key of the message.
curl -X GET "https://tempmailto.com/api/messages/message/M2ZkMXQ1" -H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
  "status": true,
  "data": {
    "id": "M2ZkMXQ1",
    "subject": "Verify your Account",
    "from": "Service Provider",
    "from_email": "[email protected]",
    "to": "[email protected]",
    "receivedAt": "2026-06-20 13:40:00",
    "is_seen": true,
    "html": true,
    "content": "<p>Hi John, your verification code is <b>857102</b></p>",
    "attachments": []
  }
}
POST Delete Message

Permanently purge and delete a specific message from the temp inbox storage.

POST https://tempmailto.com/api/messages/{apiKey}/message/{messageId}
Path Parameters
Parameter Type Status Description
apiKey string Required Your secret API authorization key.
messageId string Required The unique identifier key of the message to be deleted.
curl -X POST "https://tempmailto.com/api/messages/message/M2ZkMXQ1" -H "Authorization: Bearer YOUR_API_KEY"
Example Response
{
  "status": true,
  "message": "Message has been successfully deleted."
}