Temp Mail API

This API purpose is to automate QA tasks of the registration process and help to independent developers to create own apps and services that require temporary email functionality.

Access to the API:

In order to use our API - please contact us and we will provide to you dedicated HTTP authorization credentials. You can get account with limited amount of API requests, completely free of charge.

How it works:

  • Generate email address by using our domain names.
  • Sign up on sites that require confirmation by mail.
  • The site sends email to the address you specify.
  • Message comes to our SMTP server, processed and added to the database.
  • You make a request to the API with md5 hash of mail address.
  • You get a list of emails.

How Authentication Works

In authentication, the client requests a URL that requires authentication. The server requests the client (or user agent) to authenticate itself by sending a 401-Not Authorized code. The client, in return, sends back the same request but with login credentials as a base64 encoded string in the format username:password. This string is sent in the Authorization header field as the following:

Authorization: Basic {base64_encode(username:password)}

So if the username is testuser and the password is 1q2w3e, the following header field would be sent with the request:

Authorization: Basic dGVzdHVzZXI6MXEydzNl

Usage:

Request address:

http://api2.temp-mail.org/request/mail/id/md5/

Where md5 email address hash

Example:

To check and get a list of emails for a mailbox demo@example.com:

http://api2.temp-mail.org/request/mail/id/7c4ff521986b4ff8d29440beec01972d/

Source message list:

http://api2.temp-mail.org/request/source/id/md5/

Where md5 email address hash

Delete message

http://api2.temp-mail.org/request/delete/id/md5/

Where md5 unique identifier assigned by the system.

Domains list:

To generate email addresses by using a list of domains obtained through API:

http://api2.temp-mail.org/request/domains/

Response parameters:

API firsly returns an HTTP header

Name Description
200 Messages received (a list of all them)
404 Messages not found!

Response format parameters:

API supports the output format of the responses, it is enough to indicate the end of the query:

Format Request
XML /format/xml/
JSON /format/json/
JSONP /format/jsonp/
PHP /format/php/
HTML /format/html/

Example:

To check and get a list of emails for a mailbox demo@example.com in JSON format:

http://api2.temp-mail.org/request/mail/id/7c4ff521986b4ff8d29440beec01972d/format/json/

Response parameters:

Name Description
mail_unique_id Unique identifier assigned by the system.
mail_id Unique identifier of the message in md5 hash assigned by the system.
mail_address_id md5 email address hash
mail_from Sender
mail_subject Subject
mail_preview Preview
mail_text_only Message in text or html format (main)
mail_text Message only in text format
mail_html Message only in html format

Check account details:

To check account used requests count and limit

http://api2.temp-mail.org/request/account/

Response parameters:

Name Description
limit Requests limit
used Used requests

Questions and suggestions:

If you have any questions or suggestions, please contact us via the feedback form