API
This API purpose is to help independent developers to automate their work and create own apps and services that require temporary email functionality.
How it works:
- Generate any 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 login and domain part of email address.
- You get a list of emails.
- You make a request to the API with message ID, login and domain part of email address to get message details (body, subject, date, attachments etc)
Note: You can generate any email address using our domain names without API notification - just think your username@our_domains and use it anywhere. Our server are always ready to receive message for any email address.
Attention: For security reason you cannot read messages from addresses: abuse@domain, webmaster@domain, contact@domain, postmaster@domain, hostmaster@domain, admin@domain. All other addresses are free to use.
Basic usage:
All request should be send via HTTP GET to this endpoint:
Response is always in JSON.
Generating random email addresses:
This is NOT required. You can use any email address with our domains without generating it before.
Just think your username@our_domains and use it anywhere. Our server are always ready to receive message for any email address.
This function just generate random 6-12 character username and add to it one of our latest domains. You can generate any numer of emails at once
HTTP GET parameters:
Param name |
Value |
action |
genRandomMailbox |
count |
10 (optional) |
Sample output:
Response fields:
array |
Array with email addresses |
Getting list of active domains:
This function generate list of currently active domains on which our system is handling incoming emails at the moment
HTTP GET parameters:
Param name |
Value |
action |
getDomainList |
Sample output:
Response fields:
Checking your mailbox:
To check and get a list of emails for a mailbox demo@1secmail.com:
HTTP GET parameters:
Param name |
Value |
action |
getMessages |
login |
demo (username) |
domain |
1secmail.com (domain) |
Sample output:
Response fields:
id |
Message id |
from |
Sender email address |
subject |
Subject |
date |
Receive date |
Fetching single message:
Now you can fetch single message with another API call:
HTTP GET parameters:
Param name |
Value |
action |
readMessage |
login |
demo (username) |
domain |
1secmail.com (domain) |
id |
639 (message id) |
Sample output:
Response fields:
id |
Message id |
from |
Sender email address |
subject |
Subject |
date |
Receive date |
attachments |
Attachments list |
body |
Message body (html if exists, text otherwise) |
textBody |
Message body (text) |
htmlBody |
Message body (html) |
Attachment download:
To download attachment from message:
HTTP GET parameters:
Param name |
Value |
action |
download |
login |
demo (username) |
domain |
1secmail.com (domain) |
id |
639 (message id) |
file |
iometer.pdf (filename of attachment) |