Home Pricing API docs common problems Job Generator Identity Generator Address Generator

API documentation

Use HTTP interfaces to generate temporary email addresses and receive emails. Integrate this functionality into your own scripts, testing pipelines, or robots.

Interface base addresshttps://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.
KEY API Key authentication (optional, used to call functions with the account credentials)

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.

Carrying method (choose one of the two options)

wayexample
URL parameter?key=YOUR_API_KEY
request headerX-API-Key: YOUR_API_KEY

request example

curl "https://www.mail0.vip/mail/gen?key=YOUR_API_KEY"
Error:When the key is invalid or not available, an error code will be returned. Please pay attention to the msg field. Please keep the key securely, and avoid hardcoding it in front-end code or submitting it to a public repository.
GET /mail/gen

A temporary email address is generated randomly. This address can be used to receive messages, without the need for any prior activation steps.

request parameters

parameterstyperequireddescription
domainstring否Specify the domain name. If not provided, the default domain name of the site will be used
ttlint否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

request example

curl "https://www.mail0.vip/mail/gen?domain=ideciphera.com&ttl=60"

Response example

{
  "code": 1,
  "address": "k3j8fh2ma@ideciphera.com"
}
Tips:The TTL can be set to 10, 30, 60, or 1440 minutes. If not specified, the default value is 10. Which values can be selected depends on the “Message Expiration Permission” setting in the subscription plan. Any value exceeding this limit will result in a code=-101 being returned.
POST /mail/activate

Enable an address with a custom prefix (prefix@domain name), and verify whether the domain name is accessible for receiving messages.

request parameters

parameterstyperequireddescription
addressstring是Complete email address, for example: mybox@mail0.vip
ttlint否Message validity period (in minutes). Options: 10, 30, 60, 1440. The rules are the same as those for /mail/gen

request example

curl -X POST "https://www.mail0.vip/mail/activate" \
  -d "address=mybox@ideciphera.com&ttl=60"

Response example

{
  "code": 1,
  "address": "mybox@ideciphera.com"
}
Error:When code=0, the message will be “Invalid email format” or “The domain is not available for receiving messages”. Code=-101 indicates that the selected validity period exceeds the permissions specified in the package.
GET /mail/inbox

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.

request parameters

parameterstyperequireddescription
addressstring是The email address to be checked

request example

curl "https://www.mail0.vip/mail/inbox?address=mybox@ideciphera.com"

Response example

{
  "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"
    }
  ]
}
Tips:If exists=0, it means that no emails have been received for this address yet (the address is still valid). In JavaScript, we can use list[].id to remove duplicate addresses, thereby ensuring that only new emails are processed.
GET /mail/view

View the details of the email (sender, subject, body, attachment list). After viewing, the email will be marked as read.

request parameters

parameterstyperequireddescription
addressstring是Email address (used for verification purposes)
idint是Email ID (the ID from the inbox list)

request example

curl "https://www.mail0.vip/mail/view?address=mybox@ideciphera.com&id=1024"

Response example

{
  "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 }
    ]
  }
}
GET /mail/attach

Download the email attachment (the file is sent as a stream, not in JSON format).

request parameters

parameterstyperequireddescription
idint是Attachment ID (from the email details' attachments[].id field)

request example

curl -O "https://www.mail0.vip/mail/attach?id=88"
POST /mail/save

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.

request parameters

parameterstyperequireddescription
addressstring是The email address to be saved
keystring否API Key (Not required for logged-in web clients)

request example

curl -X POST "https://www.mail0.vip/mail/save" \
  -d "address=mybox@ideciphera.com&key=YOUR_API_KEY"
GET /mail/my

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.

request example

curl "https://www.mail0.vip/mail/my?key=YOUR_API_KEY"
JS Complete example: Generate an address → Wait for the verification code email

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));
}
Note:The temporary email address is publicly accessible by anyone. Please do not use it to receive sensitive information. Emails will be automatically deleted after they have expired.
! Instructions and limitations for use
projectdescription
Message reception limitEach 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 retentionEmails 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 frequencyIt 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 messageThe 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 privacyThe temporary email address is publicly accessible by checking the address itself. Anyone who knows the address can view the emails contained therein
malformedWhen 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

Help Center

More tips and answers to common questions are covered in this article

How to use this website to generate a temporary email address?

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 →

What is a temporary email address?

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 →

How can I save my email address so that I can continue to receive emails in the future?

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 →

How can I copy an email address and use it to register on other websites?

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 →

What is the difference between temporary email addresses and official email addresses (such as Gmail, QQ, etc.)?

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 →

Why can’t I receive the verification code or email?

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 →

Links

Services Industry Links