Docs
Temp Gmail API

Temp Gmail API

An API to generate temporary Gmail addresses.

Temp Gmail API

The Temp Gmail API allows you to programmatically generate temporary Gmail aliases. This is useful for testing, privacy, or creating disposable email addresses.

Endpoint

POST https://Mail1s.net/api/v1/temp-gmail

Headers

HeaderValueDescription
Content-Typeapplication/jsonThe content type of the request body.
wrdo-api-keyYOUR_API_KEYYour API key. You can get it from the Dashboard/Settings.

Request Body

This endpoint does not require a request body. It automatically selects an available backend Gmail account and generates a unique alias.

Response

The API returns a JSON object containing the details of the created temporary email.

FieldTypeDescription
idstringThe unique identifier of the temporary email.
tempEmailAddressstringThe generated temporary email address.
createdAtstringThe timestamp when the email was created.
expiresAtstringThe timestamp when the email will expire (if applicable).

Example

curl -X POST https://Mail1s.net/api/v1/temp-gmail \
  -H "Content-Type: application/json" \
  -H "wrdo-api-key: YOUR_API_KEY"
const response = await fetch("https://Mail1s.net/api/v1/temp-gmail", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "wrdo-api-key": "YOUR_API_KEY",
  },
});
 
const data = await response.json();
console.log(data);

Successful Response Example

{
  "id": "cm7...xyz",
  "tempEmailAddress": "[email protected]",
  "createdAt": "2024-03-06T10:00:00.000Z",
  "expiresAt": null
}

Error Responses

  • 401 Unauthorized: Missing or invalid API key.
  • 403 Forbidden: User account is inactive or plan limit reached.
  • 503 Service Unavailable: No active backend Gmail accounts available.
  • 500 Internal Server Error: An unexpected error occurred.

Get Inbox Messages

Fetch inbox messages for a Temp Gmail address.

Endpoint

GET https://Mail1s.net/api/v1/temp-gmail/inbox

Query Parameters

ParameterTypeDescription
emailstringThe Temp Gmail address to fetch messages for

Example

curl -X GET "https://Mail1s.net/api/v1/temp-gmail/[email protected]" \
  -H "wrdo-api-key: YOUR_API_KEY"

Response Example

[
  {
    "id": "gmail_message_id",
    "threadId": "thread_id",
    "snippet": "Message preview...",
    "labelIds": ["UNREAD"],
    "subject": "Subject",
    "from": "[email protected]",
    "date": "2024-03-06T10:00:00.000Z",
    "internalDate": "1710000000000"
  }
]

Get Message Detail

Fetch a single message (HTML/text) by Gmail message ID.

Endpoint

GET https://Mail1s.net/api/v1/temp-gmail/message/:id

Query Parameters

ParameterTypeDescription
emailstringThe Temp Gmail address the message belongs to

Example

curl -X GET "https://Mail1s.net/api/v1/temp-gmail/message/[email protected]" \
  -H "wrdo-api-key: YOUR_API_KEY"

Response Example

{
  "id": "gmail_message_id",
  "threadId": "thread_id",
  "snippet": "Message preview...",
  "labelIds": [],
  "subject": "Subject",
  "from": "[email protected]",
  "date": "2024-03-06T10:00:00.000Z",
  "internalDate": "1710000000000",
  "html": "<p>Full HTML content...</p>"
}

Get Temp Gmail List

You can also retrieve a list of your created temporary Gmails.

Endpoint

GET https://Mail1s.net/api/v1/temp-gmail

Query Parameters

ParameterTypeDescription
pagenumberPage number (default: 1)
limitnumberItems per page (default: 10)

Example

curl -X GET "https://Mail1s.net/api/v1/temp-gmail?page=1&limit=10" \
  -H "wrdo-api-key: YOUR_API_KEY"