API Documentation

Cheapluxury TempMail REST API

Introduction

Welcome to the Cheapluxury TempMail API documentation. This RESTful API allows you to programmatically create temporary email addresses, receive emails, and manage your temporary inbox.

Base URL

${window.location.origin}

Response Format

JSON

Rate Limit

100 requests/min

GET Get Domains

Retrieve all available email domains for registration.

Endpoint

/domains

Response (200 OK)

{
  "response_code": 200,
  "data": {
    "domains": [
      "example.com",
      "tempmail.com",
      "cheapluxury.eu"
    ]
  }
}

Code Examples

curl -X GET ${window.location.origin}/domains

POST Register User

Create a new temporary email account.

Endpoint

/register

Request Body

{
  "email": "[email protected]",
  "password": "SecurePass123"
}

Password must be at least 8 characters with uppercase, lowercase, and digit

Response (201 Created)

{
  "response_code": 201,
  "message": "Registration successful",
  "data": {
    "email": "[email protected]"
  }
}

Code Examples

curl -X POST ${window.location.origin}/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "SecurePass123"
  }'

GET Generate Random Email

Quick generate a random temporary email address with credentials.

Endpoint

/random_email

Response (200 OK)

{
  "response_code": 200,
  "message": "Random email generated successfully",
  "data": {
    "email": "[email protected]",
    "password": "SecurePass789"
  }
}

Code Examples

curl -X GET ${window.location.origin}/random_email

POST Login User

Authenticate and retrieve your temporary email address.

Endpoint

/login

Request Body

{
  "email": "[email protected]",
  "password": "SecurePass123"
}

Response (200 OK)

{
  "response_code": 200,
  "message": "Login successful",
  "data": {
    "emails": [
      {
        "id": 67890,
        "from_addr": "[email protected]",
        "to_addr": "[email protected]",
        "subject": "Welcome!",
        "date": "2025-11-29T10:35:00",
        "body_text": "Thank you for signing up...",
        "body_html": "...",
        "inline_images": {},
        "has_attachments": false,
        "size": 1234,
        "flags": [],
        "message_id": "",
        "in_reply_to": null,
        "references": null
      }
    ]
  }
}

Code Examples

curl -X POST ${window.location.origin}/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "SecurePass123"
  }'

POST Get Emails

Retrieve all emails for your temporary email address.

Endpoint

/email/get

Request Body

{
  "email": "[email protected]",
  "password": "SecurePass123"
}

Response (200 OK)

{
  "response_code": 200,
  "message": "Emails retrieved successfully",
  "data": {
    "emails": [
      {
        "id": 67890,
        "from_addr": "[email protected]",
        "to_addr": "[email protected]",
        "subject": "Welcome!",
        "date": "2025-11-29T10:35:00",
        "body_text": "Thank you for signing up...",
        "body_html": "...",
        "inline_images": {},
        "has_attachments": false,
        "size": 1234,
        "flags": [],
        "message_id": "",
        "in_reply_to": null,
        "references": null
      }
    ]
  }
}

Code Examples

curl -X POST ${window.location.origin}/email/get \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "SecurePass123"
  }'

POST View Specific Email

Retrieve a specific email by its Message-ID.

Endpoint

/email/view

Request Body

{
  "email": "[email protected]",
  "password": "SecurePass123",
  "message_id": ""
}

Response (200 OK)

{
  "response_code": 200,
  "message": "Email retrieved successfully",
  "data": {
    "email": {
      "message_id": "",
      "from_addr": "[email protected]",
      "to_addr": "[email protected]",
      "subject": "Welcome!",
      "date": "2025-11-29T10:35:00",
      "body_text": "Thank you for signing up...",
      "body_html": "...",
      "inline_images": {},
      "has_attachments": false,
      "size": 1234,
      "flags": [],
      "in_reply_to": null,
      "references": null
    }
  }
}

Code Examples

curl -X POST ${window.location.origin}/email/view \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "SecurePass123",
    "message_id": ""
  }'

Error Responses

The API uses standard HTTP status codes to indicate success or failure.

400 Bad Request
{
  "response_code": 400,
  "message": "Invalid request parameters"
}
401 Unauthorized
{
  "response_code": 401,
  "message": "Invalid credentials"
}
404 Not Found
{
  "response_code": 404,
  "message": "Email not found"
}
429 Too Many Requests
{
  "response_code": 429,
  "message": "Rate limit exceeded. Please try again later."
}