API

API

API

TempMail Bank API Documentation

TempMail Bank API helps developers create temporary inboxes, read incoming messages, manage disposable email sessions, and access attachments through simple endpoints.

How It Works

  1. Create a temporary inbox using one of the available domains.
  2. Use that address for sign-ups, verification, testing, or short-term workflows.
  3. Incoming mail is received and made available through the mailbox endpoint.
  4. Use the API to read messages, check individual message details, or remove data when needed.
  5. Download attachments when available.

Ready to Get Started?

Contact us to request your API key and start integrating TempMail Bank into your application.

Get API Key

API Documentation

This section explains the available endpoints and their basic usage.

Get Domains

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

Parameters:

  • apiKey – your API key
  • type – domain group such as free, premium, or all

Example Request:

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

Example Response:

{
  "status": true,
  "data": {
    "domains": [
      { "domain": "samplefree.com", "type": "Free" },
      { "domain": "mailzone.net", "type": "Free" },
      { "domain": "premiumbox.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": "sample@domain.com",
    "domain": "domain.com",
    "expire_at": "2026-01-01T00:00:00.000000Z",
    "created_at": "2026-01-01T00:00:00.000000Z",
    "email_token": "email_token_here"
  }
}

Important Notes:

  • Every request must include a valid API key.
  • Rate limits may apply depending on account type.
  • Mailbox duration may vary depending on configuration and domain.

Update Email

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

Parameters:

  • apiKey – your API key
  • email – current mailbox address
  • username – new local part
  • domain – new domain name

Example Request:

POST /api/emails/your-api-key/sample@domain.com/newuser/newdomain.com

Delete Email

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

Parameters:

  • apiKey – your API key
  • email – mailbox to remove

Example Request:

POST /api/emails/your-api-key/sample@domain.com

Example Response:

{
  "status": true,
  "message": "Mailbox deleted successfully."
}

Get Messages

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

Parameters:

  • apiKey – your API key
  • email – mailbox to read

Example Request:

GET /api/messages/your-api-key/sample@domain.com

Example Response:

{
  "status": true,
  "mailbox": "sample@domain.com",
  "messages": [
    {
      "subject": "Welcome",
      "from": "Example Sender",
      "receivedAt": "2026-01-01 10:00:00",
      "id": "message_id_here",
      "attachments": []
    }
  ]
}

Get Message

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

Parameters:

  • apiKey – your API key
  • messageId – message identifier

Example Request:

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

Delete Message

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

Parameters:

  • apiKey – your API key
  • messageId – message identifier

Example Request:

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

Download Attachment

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

Parameters:

  • hash_id – attachment or message hash
  • file – file name if needed

Example Request:

GET /api/d/hash-id/document.pdf

Example Response:

The requested file is returned as a direct download when available.

Token to Email

GET /token/{email_token}

Parameters:

  • email_token – mailbox token

Description:

This route can be used to recreate or access a mailbox session associated with a valid token.

Important Notes

  • All requests must include a valid API key.
  • Mailbox availability may vary depending on service settings.
  • Temporary inboxes are intended for routine short-term use.
  • Temporary inboxes may be public and are not intended for banking or sensitive accounts.

Get Your API Key

Need API access for testing, integration, or automation? Contact us to request a key.

Request API Access

Do you accept cookies?

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

More