API

Canva Pro Subscription
API
TempMail To API Documentation | Temporary Email Service

This API allows you to create temporary email addresses and manage messages.

How It Works

  1. Create a new email address by using our domain names
  2. Use this email address on any website
  3. The website sends an email message to the email address you specify
  4. A message comes to our SMTP server, processed and added to the database
  5. You make a request to the API to fetch the message list
  6. That's it! You're awesome!

Ready to Get Started?

Contact us to get your free API Key and start integrating today!

Get API Key

API Documentation

This documentation provides details on how to use the API endpoints.

Get Domains

GET api/domains/{apiKey}/{type}

Parameters:

  • apiKey - Your API key.
  • type - Type of domains to fetch (free, premium, all).

Example Request:

GET api/domains/your-api-key/all

Example Response:

{
    "status": true,
    "data": {
        "domains": [
            {
                "domain": "free.com",
                "type": "Free"
            },
            {
                "domain": "lobage.com",
                "type": "Free"
            },
            {
                "domain": "premium.com",
                "type": "Premium"
            }
        ]
    }
}

Create Email

POST api/emails/{apiKey}

Parameters:

  • apiKey - Your API key.

Example Request:

POST api/emails/your-api-key

Example Response:

{
    "status": true,
    "data": {
        "email": "[email protected]",
        "domain": "example.com",
        "ip": "127.0.0.1",
        "fingerprint": "eef780ab2ec7535e66c1405c0bff1c64",
        "expire_at": "2025-01-01T00:00:00.000000Z",
        "created_at": "2025-01-01T00:00:00.000000Z",
        "id": 1,
        "email_token": "email_token"
    }
}

Important Notes:

  • All API requests must include your API key
  • Rate limiting may apply for free accounts
  • Premium domains require a paid subscription
  • Email addresses expire after 10 minutes by default (extendable)

Update Email

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

Parameters:

  • apiKey - Your API key.
  • email - The current email address.
  • username - The new username.
  • domain - The new domain.

Example Request:

POST api/emails/your-api-key/[email protected]/newuser/newexample.com

Example Response:

{
    "status": true,
    "data": {
        "email": "[email protected]",
        "domain": "newexample.com",
        "ip": "127.0.0.1",
        "fingerprint": "eef780ab2ec7535e66c1405c0bff1c64",
        "expire_at": "2025-01-01T00:00:00.000000Z",
        "created_at": "2025-01-01T00:00:00.000000Z",
        "id": 2,
        "email_token": "email_token"
    }
}

Delete Email

POST api/emails/{apiKey}/{email}

Parameters:

  • apiKey - Your API key.
  • email - The email address to delete.

Example Request:

POST api/emails/your-api-key/[email protected]

Example Response:

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

Get Messages

GET api/messages/{apiKey}/{email}

Parameters:

  • apiKey - Your API key.
  • email - The email address to fetch messages for.

Example Request:

GET api/messages/your-api-key/[email protected]

Example Response:

{
    "status": true,
    "mailbox": "[email protected]",
    "messages": [
        {
            "is_seen": true,
            "subject": "Test Subject",
            "from": "John Doe",
            "from_email": "[email protected]",
            "to": "[email protected]",
            "receivedAt": "2025-01-01 00:00:38",
            "id": "ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1",
            "html": true,
            "content": "Test content",
            "attachments": [
                {
                    "name": "file.txt",
                    "extension": "txt",
                    "size": 91,
                    "url": "http://yoursite.com/api/d/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1/file.txt"
                }
            ]
        }
    ]
}

Get Message

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

Parameters:

  • apiKey - Your API key.
  • messageId - The ID of the message to fetch.

Example Request:

GET api/messages/your-api-key/message/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1

Example Response:

{
    "status": true,
    "data": {
        "is_seen": true,
        "subject": "Test Subject",
        "from": "John Doe",
        "from_email": "[email protected]",
        "to": "[email protected]",
        "receivedAt": "2024-12-28 00:00:38",
        "id": "ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1",
        "html": true,
        "content": "Test content",
        "attachments": [
            {
                "name": "file.txt",
                "extension": "txt",
                "size": 91,
                "url": "http://yoursite.com/api/d/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1/file.txt"
            }
        ]
    }
}

Delete Message

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

Parameters:

  • apiKey - Your API key.
  • messageId - The ID of the message to delete.

Example Request:

POST api/messages/your-api-key/message/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1

Example Response:

{
    "status": true,
    "message": "Message was deleted successfully."
}

Download Attachment

GET api/d/{hash_id}/{file?}

Parameters:

  • hash_id - The hash ID of the message.
  • file - The name of the file to download (optional).

Example Request:

GET api/d/abc123/filename.pdf

Example Response:

The file will be downloaded directly.

Token to Email

GET /token/{email_token}

Parameters:

  • email_token - Your email token

Description:

Send your visitors to a site with a token to create the same email.

Example Response:

The user will be redirected to a page where the email associated with the token is created or displayed.

Get Your API Key

Ready to integrate TempMail To into your application?

Contact us to get your free API Key and start integrating today!

Get API Key