Use HTTP interfaces to generate temporary email addresses and receive emails. Integrate this functionality into your own scripts, testing pipelines, or robots.
https://www.mail0.vip
All interfaces return data in JSON format (except for those available for download as attachments). Visitors can make anonymous calls directly. Users who purchase API packages can also use API Keys to make calls as authenticated users, subject to the quotas associated with their packages. For more information, see “API Key Authentication” below.
When not carrying the Key, you can make anonymous calls from a guest account. Generating and accessing temporary emails is completely free of charge. If you have purchased a package that includes API functionality, you can generate your own API Key in the Member Center → Developers section. Using this Key for calls will allow you to benefit from the saved quota and retention period offered by the corresponding package.
| way | example |
|---|---|
| URL parameter | ?key=YOUR_API_KEY |
| request header | X-API-Key: YOUR_API_KEY |
curl "https://www.mail0.vip/mail/gen?key=YOUR_API_KEY"
A temporary email address is generated randomly. This address can be used to receive messages, without the need for any prior activation steps.
| parameters | type | required | description |
|---|---|---|---|
domain | string | 否 | Specify the domain name. If not provided, the default domain name of the site will be used |
ttl | int | 否 | Message validity period (in minutes). Options include 10, 30, 60, and 1440. If not specified, the default value is 10. Which options are available depends on the subscription’s “Message validity period permissions”. If the period exceeds the allowed range, the error code -101 will be returned |
curl "https://www.mail0.vip/mail/gen?domain=ideciphera.com&ttl=60"
{
"code": 1,
"address": "k3j8fh2ma@ideciphera.com"
}
Enable an address with a custom prefix (prefix@domain name), and verify whether the domain name is accessible for receiving messages.
| parameters | type | required | description |
|---|---|---|---|
address | string | 是 | Complete email address, for example: mybox@mail0.vip |
ttl | int | 否 | Message validity period (in minutes). Options: 10, 30, 60, 1440. The rules are the same as those for /mail/gen |
curl -X POST "https://www.mail0.vip/mail/activate" \
-d "address=mybox@ideciphera.com&ttl=60"
{
"code": 1,
"address": "mybox@ideciphera.com"
}
Fetch the inbox from the specified address (last 50 messages, ordered in reverse order of receipt time). It is recommended to poll every 1–3 seconds.
| parameters | type | required | description |
|---|---|---|---|
address | string | 是 | The email address to be checked |
curl "https://www.mail0.vip/mail/inbox?address=mybox@ideciphera.com"
{
"code": 1,
"exists": 1,
"address": "mybox@ideciphera.com",
"list": [
{
"id": 1024,
"from_addr": "noreply@example.com",
"from_name": "Example",
"subject": "Your verification code is 826413",
"size": 2048,
"is_read": 0,
"attachments": 0,
"received_at": "2026-10-14 18:20:31"
}
]
}
View the details of the email (sender, subject, body, attachment list). After viewing, the email will be marked as read.
| parameters | type | required | description |
|---|---|---|---|
address | string | 是 | Email address (used for verification purposes) |
id | int | 是 | Email ID (the ID from the inbox list) |
curl "https://www.mail0.vip/mail/view?address=mybox@ideciphera.com&id=1024"
{
"code": 1,
"data": {
"id": 1024,
"from_addr": "noreply@example.com",
"from_name": "Example",
"subject": "Your verification code is 826413",
"body_text": "Dear user, your verification code is 826413, valid for 5 minutes.",
"received_at_fmt": "2026-10-14 18:20:31",
"attachments": [
{ "id": 88, "filename": "invoice.pdf", "size": 102400 }
]
}
}
Download the email attachment (the file is sent as a stream, not in JSON format).
| parameters | type | required | description |
|---|---|---|---|
id | int | 是 | Attachment ID (from the email details' attachments[].id field) |
curl -O "https://www.mail0.vip/mail/attach?id=88"
Save an address to your account for long-term retention (requires login or possession of an API key). The number of addresses that can be saved is limited by the “Number of Email Addresses Saved” parameter in your subscription.
| parameters | type | required | description |
|---|---|---|---|
address | string | 是 | The email address to be saved |
key | string | 否 | API Key (Not required for logged-in web clients) |
curl -X POST "https://www.mail0.vip/mail/save" \
-d "address=mybox@ideciphera.com&key=YOUR_API_KEY"
List the email addresses that have been saved under your account. You need to log in or possess an API key to access this information.
curl "https://www.mail0.vip/mail/my?key=YOUR_API_KEY"
The following script can be executed directly in the browser console or in a Node.js environment: it generates an address, polls the inbox, and prints the verification code as soon as the first email is received.
// 1. Generate a temporary address const BASE = 'https://www.mail0.vip'; const gen = await (await fetch(BASE + '/mail/gen')).json(); const address = gen.address; console.log('My temporary email address:', address); // 2. Polling of the inbox (occurs every 2 seconds; stops once the first message is received) const seen = new Set(); while (true) { const d = await (await fetch(BASE + '/mail/inbox?address=' + encodeURIComponent(address))).json(); for (const m of d.list || []) { if (seen.has(m.id)) continue; seen.add(m.id); const code = (m.subject || '').match(/\d{4,8}/); console.log('New emails:', m.subject, code ? 'Captcha ' + code[0] : ''); } await new Promise(r => setTimeout(r, 2000)); }
| project | description |
|---|---|
| Message reception limit | Each address has a daily limit on the number of emails that can be received (30 emails per day for free; higher limits available for members). Any additional requests will be rejected |
| Email retention | Emails are automatically deleted after the specified retention period. For free users, this period is 7 days; for members, it’s 30 or 90 days. Please ensure that you receive these emails on time |
| polling frequency | It is recommended to poll the same address every 1–3 seconds. Avoid high-frequency concurrent polling of the same address |
| Validity period of the received message | The validity period of the address is determined by the TTL parameter. The duration can be adjusted according to the “Email Receipt Validity Period” settings in the subscription plan (for free plans, the default value is 10 minutes). After the period expires, the address will no longer accept emails. “Save This Email Address” allows the address to remain active indefinitely |
| address privacy | The temporary email address is publicly accessible by checking the address itself. Anyone who knows the address can view the emails contained therein |
| malformed | When an error occurs, the response should be {"code": 0, "msg": "Reason"}. If the operation is successful, the value of "code" should be 1. Codes -100 and -101 indicate that the user is not logged in or that the API key is invalid respectively. Code -101 also indicates that the selected validity period exceeds the permissions allowed by the package |
More tips and answers to common questions are covered in this article
Open the homepage and click “Update Email”. This will generate a random temporary address in one step. You can also customize the prefix and domain name as desired.
Read the full text →Temporary/Disposable Email addresses are type of email addresses that require no registration and can be used once and then discarded. These addresses are used to receive verification codes and temporary messages.
Read the full text →Click “Save This Email Address” to convert the address into a permanent one. Once logged in to the membership center, you can manage all your addresses centrally.
Read the full text →Click the “Copy” button on the address bar, then paste the address into the email input field of the target website to complete the registration process.
Read the full text →Temporary email addresses are anonymous and used for a limited period of time, without any connection to an individual’s identity. On the other hand, legitimate email addresses are retained over time, require registration, and can be recovered if needed. The two serve different purposes.
Read the full text →If you cannot receive emails, it’s likely because the email address has expired, the delivery is delayed, or the website blocks the temporary email domain. You can try refreshing the address or changing it to another domain before attempting again.
Read the full text →