Api Documentation

Temp Mail API – Documentation

All endpoints are JSON over HTTPS and return a common envelope:

{
  "status": true,
  "data": { ... }
}
/* on error */
{ "status": false, "message": "Reason" }

Base URL & Authentication

  • Base URL: https://tempmailapi.com/api
  • Base API Key: CZXXyF8jg5JRH7UbQWVYiKMQjQznCB6
  • Auth: Path parameter {apiKey} must equal your panel’s API key.
  • Content-Type: application/json
  • Tip (CLI): When using curl, include -H "Accept: application/json".

Endpoints

1) List Domains

GET /domains/{apiKey}/{type}

Path ParamTypeDescription
apiKeystringYour API key
typestringall | free | premium

200 Response

{
  "status": true,
  "data": {
    "domains": [
      { "domain": "tempmailapi.online", "type": "Free" },
      { "domain": "vipmail.example",    "type": "Premium" }
    ]
  }
}

cURL

curl -s -H "Accept: application/json" \
  https://tempmailapi.com/api/domains/CZXXyF8jg5JRH7UbQWVYiKMQjQznCB6/all

2) Create Random Mailbox

POST /emails/{apiKey}

200/201 Response

{
  "status": true,
  "data": {
    "id": 123,
    "email": "ab3cd@tempmailapi.online",
    "domain": "tempmailapi.online",
    "ip": "1.2.3.4",
    "fingerprint": "f3e2c1...",
    "expire_at": "2025-10-21T13:44:50Z",
    "created_at": "2025-10-21T13:14:50Z",
    "email_token": "ENCRYPTED_TOKEN"
  }
}

cURL

curl -s -X POST -H "Accept: application/json" \
  https://tempmailapi.com/api/emails/CZXXyF8jg5JRH7UbQWVYiKMQjQznCB6

3) Rotate/Rename Mailbox

POST /emails/{apiKey}/{email}/{username}/{domain}

Path ParamDescription
emailCurrent mailbox (URL-encoded)
usernameNew local part (forbidden IDs are blocked)
domainMust be an enabled domain

200 Response

{
  "status": true,
  "data": {
    "id": 456,
    "email": "newname@tempmailapi.online",
    "domain": "tempmailapi.online",
    "expire_at": "2025-10-22T13:44:50Z",
    "created_at": "2025-10-21T13:44:50Z"
  }
}

cURL

curl -s -X POST -H "Accept: application/json" \
  "https://tempmailapi.com/api/emails/CZXXyF8jg5JRH7UbQWVYiKMQjQznCB6/old%40tempmailapi.online/newname/tempmailapi.online"

4) Delete Mailbox

POST /emails/{apiKey}/{email}

200 Response

{
  "status": true,
  "message": "Email has been successfully deleted."
}

cURL

curl -s -X POST -H "Accept: application/json" \
  "https://tempmailapi.com/api/emails/CZXXyF8jg5JRH7UbQWVYiKMQjQznCB6/ab3cd%40tempmailapi.online"

5) List Messages

GET /messages/{apiKey}/{email}

QueryTypeDescription
since_daysintOptional. Only messages within last N days

200 Response

{
  "status": true,
  "data": {
    "messages": [
      {
        "id": "eNcoDedHash...",
        "from": "invideo AI",
        "subject": "Your login code",
        "created_at": "2025-10-21T13:36:31Z",
        "hash_id": "eNcoDedHash...",
        "has_attachments": false
      }
    ]
  }
}

cURL

curl -s -H "Accept: application/json" \
  "https://tempmailapi.com/api/messages/CZXXyF8jg5JRH7UbQWVYiKMQjQznCB6/ab3cd%40tempmailapi.online?since_days=7"

6) Get Single Message (full body)

GET /messages/{apiKey}/message/{messageId}

messageId is the message hash_id returned by the list.

200 Response

{
  "status": true,
  "data": {
    "message": {
      "id": "eNcoDedHash...",
      "from": "invideo AI",
      "subject": "651693 — Your login code",
      "created_at": "2025-10-21T13:36:31Z",
      "body": "<p>Here's your login code...</p>",
      "hash_id": "eNcoDedHash...",
      "attachments": [
        {
          "filename": "invoice.pdf",
          "size": 12345,
          "link": "https://tempmailapi.com/api/d/eNcoDedHash.../invoice.pdf"
        }
      ]
    }
  }
}

cURL

curl -s -H "Accept: application/json" \
  "https://tempmailapi.com/api/messages/CZXXyF8jg5JRH7UbQWVYiKMQjQznCB6/message/eNcoDedHash..."

7) Delete Message

POST /messages/{apiKey}/message/{messageId}

200 Response

{
  "status": true,
  "message": "Message deleted",
  "mailbox": "ab3cd@tempmailapi.online"
}

cURL

curl -s -X POST -H "Accept: application/json" \
  "https://tempmailapi.com/api/messages/CZXXyF8jg5JRH7UbQWVYiKMQjQznCB6/message/eNcoDedHash..."

8) Download Attachment

GET /d/{hash_id}/{file}

Streams the saved attachment for the specified message.

cURL

curl -OJ "https://tempmailapi.com/api/d/eNcoDedHash.../invoice.pdf"

Object Models

Domain

{ "domain": "tempmailapi.online", "type": "Free" }

Message (list item)

{
  "id": "eNcoDedHash...",
  "from": "Sender",
  "subject": "Subject",
  "created_at": "2025-10-21T13:36:31Z",
  "hash_id": "eNcoDedHash...",
  "has_attachments": true
}

Message (detail)

{
  "id": "eNcoDedHash...",
  "from": "Sender",
  "subject": "Subject",
  "created_at": "2025-10-21T13:36:31Z",
  "body": "<!-- HTML or text -->",
  "hash_id": "eNcoDedHash...",
  "attachments": [
    { "filename": "file.ext", "size": 1234,
      "link": "https://tempmailapi.com/api/d/eNco.../file.ext" }
  ]
}

Errors

  • 401 Unauthorized – bad apiKey
  • 404 Not Found – resource doesn’t exist / invalid type
  • 422 Validation error – invalid email format, forbidden username, unknown domain
  • 500 – server error

Notes

  • Always URL-encode emails in path params: user+tag@d.comuser%2Btag%40d.com.
  • body from Get Single Message may be HTML or plain text; render directly in clients.
  • Attachment links are public; protect /api/d/* if you need signed URLs.
  • Optional query since_days is supported by List Messages.
Features

Why Choose Our Temp Mail?

Explore the features that make our temporary email service fast, secure, and easy to use

100% Safe

Protect your privacy by keeping spam and unwanted emails out of your personal inbox

Instant Access

Receive emails instantly with real-time inbox updates—no delays, no refresh required.

Custom Domains

Choose from multiple email domains to create a unique and secure temporary email address.

Simple & Free

Create temporary email addresses in just a few clicks. No registration required, and it’s always free to use!

Unlimited Usage

Create as many temporary emails as you need—no limits, no hidden fees, and no restrictions on usage.

Favorites Feature

Save important messages to your favorites for quick and easy access whenever you need them.

Multiple Languages

Available in several languages so users around the world can use the service comfortably.

Mobile-Friendly

Access your temporary inbox anytime, anywhere. Fully responsive design works on all devices.

Auto-Cleanup

Old emails are automatically deleted to keep your inbox clean and clutter-free—no manual cleanup needed.

Ready to Take Back Control?

Create your free, disposable email address in seconds. No strings attached.

Get Your Free Inbox Now
Do you accept cookies?

We use cookies to enhance your browsing experience. By using this site, you consent to our cookie policy.

More