Current Version: 1.0 | Last Updated: May 16, 2025
Welcome to the 0mail.pro API! This API allows you to programmatically manage temporary email addresses, retrieve messages, and more. It's designed to be straightforward and easy to integrate into your applications.
https://0mail.pro/api/
Your API Key: llkUl92d8KTHuEr7nHaKYrmRZKB9mWs
Available Generic Domains:
ExampleFree1.com
, ExampleFree2.com
, (and others as available)ExamplePremium1.com
, (and others as available)These generic names are used in documentation examples. The actual available domains can be fetched using the "Get Domains" endpoint.
All API requests are authenticated using an API key. You must include your apiKey
as a path parameter in the request URL for most endpoints.
Example: https://0mail.pro/api/domains/YOUR_API_KEY/all
The API uses standard HTTP verbs:
GET
: To retrieve resources.POST
: To create or update resources.All API responses are in JSON format. A typical successful response includes a status
field (boolean) and a data
or message
field.
{
"status": true,
"data": { /* ... relevant data ... */ }
}
{
"status": true,
"message": "Operation was successful."
}
The API uses standard HTTP status codes to indicate the success or failure of a request:
Retrieves a list of currently available domains, which can be filtered by type (free, premium, or all).
HTTP Method: GET
Endpoint Structure: /domains/{apiKey}/{type}
Full URL Example: https://0mail.pro/api/domains/XQYiXW0nqFdjQEZchg8AMvThdOVOJ1z/all
Parameter | Type | Location | Required | Description |
---|---|---|---|---|
apiKey | String | Path | Yes | Your unique API key. |
type | String | Path | Yes | Type of domains to fetch. Valid options: free , premium , all . |
Fetching all domains:
https://0mail.pro/api/domains/XQYiXW0nqFdjQEZchg8AMvThdOVOJ1z/all
Fetching only free domains:
https://0mail.pro/api/domains/XQYiXW0nqFdjQEZchg8AMvThdOVOJ1z/free
Fetching only premium domains:
https://0mail.pro/api/domains/XQYiXW0nqFdjQEZchg8AMvThdOVOJ1z/premium
{
"status": true,
"data": {
"domains": [
{
"domain": "ExampleFree1.com",
"type": "Free"
},
{
"domain": "ExampleFree2.com",
"type": "Free"
},
{
"domain": "ExamplePremium1.com",
"type": "Premium"
}
]
}
}
Creates a new temporary email address. The system automatically generates a unique username and assigns an available domain.
HTTP Method: POST
Endpoint Structure: /emails/{apiKey}
Full URL Example: https://0mail.pro/api/emails/XQYiXW0nqFdjQEZchg8AMvThdOVOJ1z
Parameter | Type | Location | Required | Description |
---|---|---|---|---|
apiKey | String | Path | Yes | Your unique API key. |
https://0mail.pro/api/emails/XQYiXW0nqFdjQEZchg8AMvThdOVOJ1z
{
"status": true,
"data": {
"email": "[email protected]",
"domain": "ExampleFree1.com",
"ip": "YOUR_REQUEST_IP_ADDRESS",
"fingerprint": "a_unique_browser_or_session_fingerprint",
"expire_at": "2025-12-31T23:59:59.000000Z",
"created_at": "2025-05-16T10:30:00.000000Z",
"id": 789,
"email_token": "unique_generated_token_for_this_email"
}
}
Allows changing the username and/or domain of an existing temporary email address.
HTTP Method: POST
Endpoint Structure: /emails/{apiKey}/{current_email}/{new_username}/{new_domain}
Parameter | Type | Location | Required | Description |
---|---|---|---|---|
apiKey | String | Path | Yes | Your unique API key. |
current_email | String | Path | Yes | The full current email address (e.g., [email protected] ). |
new_username | String | Path | Yes | The desired new username. |
new_domain | String | Path | Yes | The desired new domain (e.g., ExampleFree2.com or ExamplePremium1.com ). |
https://0mail.pro/api/emails/XQYiXW0nqFdjQEZchg8AMvThdOVOJ1z/[email protected]/mynewcoolname/ExamplePremium1.com
{
"status": true,
"data": {
"email": "[email protected]",
"domain": "ExamplePremium1.com",
"ip": "YOUR_REQUEST_IP_ADDRESS",
"fingerprint": "updated_fingerprint_if_applicable",
"expire_at": "2025-12-31T23:59:59.000000Z",
"created_at": "2025-05-16T10:30:00.000000Z",
"id": 790,
"email_token": "potentially_new_email_token"
}
}
Permanently deletes a temporary email address and all its associated messages.
HTTP Method: POST
Endpoint Structure: /emails/{apiKey}/{email_to_delete}
Parameter | Type | Location | Required | Description |
---|---|---|---|---|
apiKey | String | Path | Yes | Your unique API key. |
email_to_delete | String | Path | Yes | The full email address to be deleted (e.g., [email protected] ). |
https://0mail.pro/api/emails/XQYiXW0nqFdjQEZchg8AMvThdOVOJ1z/[email protected]
{
"status": true,
"message": "Email has been successfully deleted."
}
Retrieves a list of all messages received by a specific email address.
HTTP Method: GET
Endpoint Structure: /messages/{apiKey}/{email_address}
Parameter | Type | Location | Required | Description |
---|---|---|---|---|
apiKey | String | Path | Yes | Your unique API key. |
email_address | String | Path | Yes | The email address for which to retrieve messages (e.g., [email protected] ). |
https://0mail.pro/api/messages/XQYiXW0nqFdjQEZchg8AMvThdOVOJ1z/[email protected]
{
"status": true,
"mailbox": "[email protected]",
"messages": [
{
"id": "msg_unique_id_1",
"subject": "Your Weekly Newsletter",
"from": "Newsletter Sender ",
"from_email": "[email protected]",
"to": "[email protected]",
"receivedAt": "2025-05-16T12:30:00Z",
"is_seen": false,
"html": true,
"content": "
Hello! Here is your newsletter.
",
"attachments": [
{
"name": "report.pdf",
"extension": "pdf",
"size": 204800,
"url": "https://0mail.pro/api/d/msg_unique_id_1/report.pdf"
}
]
},
{
"id": "msg_unique_id_2",
"subject": "Quick Update",
"from": "[email protected]",
"from_email": "[email protected]",
"to": "[email protected]",
"receivedAt": "2025-05-15T09:15:00Z",
"is_seen": true,
"html": false,
"content": "Just a quick update, project is on track.",
"attachments": []
}
]
}
Retrieves the full details of a single message by its unique message ID.
HTTP Method: GET
Endpoint Structure: /messages/{apiKey}/message/{messageId}
Parameter | Type | Location | Required | Description |
---|---|---|---|---|
apiKey | String | Path | Yes | Your unique API key. |
messageId | String | Path | Yes | The unique ID of the message to retrieve (e.g., msg_unique_id_1 ). |
https://0mail.pro/api/messages/XQYiXW0nqFdjQEZchg8AMvThdOVOJ1z/message/msg_unique_id_1
{
"status": true,
"data": {
"id": "msg_unique_id_1",
"subject": "Your Weekly Newsletter",
"from": "Newsletter Sender ",
"from_email": "[email protected]",
"to": "[email protected]",
"receivedAt": "2025-05-16T12:30:00Z",
"is_seen": true,
"html": true,
"content": "
Hello! Here is your newsletter.
",
"attachments": [
{
"name": "report.pdf",
"extension": "pdf",
"size": 204800,
"url": "https://0mail.pro/api/d/msg_unique_id_1/report.pdf"
}
]
}
}
Permanently deletes a single message by its unique message ID.
HTTP Method: POST
Endpoint Structure: /messages/{apiKey}/message/{messageId}
Parameter | Type | Location | Required | Description |
---|---|---|---|---|
apiKey | String | Path | Yes | Your unique API key. |
messageId | String | Path | Yes | The unique ID of the message to delete (e.g., msg_unique_id_1 ). |
https://0mail.pro/api/messages/XQYiXW0nqFdjQEZchg8AMvThdOVOJ1z/message/msg_unique_id_1
{
"status": true,
"message": "Message was deleted successfully."
}
Downloads an email attachment. The direct URL is provided within message details.
HTTP Method: GET
Endpoint Structure: /d/{message_hash_id}/{filename}
Parameter | Type | Location | Required | Description |
---|---|---|---|---|
message_hash_id | String | Path | Yes | The message ID (e.g., msg_unique_id_1 ). |
filename | String | Path | Yes | The name of the file (e.g., report.pdf ). |
https://0mail.pro/api/d/msg_unique_id_1/report.pdf
A 200 OK response with the file content. The browser will typically initiate a download.
Allows direct access to an email inbox using an email_token
.
HTTP Method: GET
Endpoint Structure (Note: relative to main site URL): /token/{email_token}
Full URL Example: https://0mail.pro/token/unique_generated_token_for_this_email
Parameter | Type | Location | Required | Description |
---|---|---|---|---|
email_token | String | Path | Yes | The email_token from email creation/update. |
https://0mail.pro/token/unique_generated_token_for_this_email
User's browser is typically redirected (e.g., via a 302 Found) to the web inbox.