API Documentation

Complete guide to integrate temporary email functionality into your applications

Getting Started
Quick overview of the Temporary Email API

Base URL

https://parekso-temp.pages.dev/api

Authentication

No authentication required. All endpoints are publicly accessible.

Response Format

All responses are in JSON format.

Supported Domains

  • jigidaw.my.id
  • poam.jigidaw.my.id
  • rokbar.jigidaw.my.id
  • poam.secretkey.fun
  • rokbar.secretkey.fun

Query GET /api/emails/domains to fetch the currently selectable domains dynamically.

📖 How It Works
Complete usage flow from email creation to message retrieval
// Step 1: Generate email
const gen = await fetch('https://parekso-temp.pages.dev/api/emails/generate', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ customName: 'test', domain: 'poam.jigidaw.my.id' })
})
const { data } = await gen.json()
const emailId = data.id
const emailAddress = data.email  // test@poam.jigidaw.my.id

// Step 2: Poll for messages (every 10 seconds)
setInterval(async () => {
  const msgs = await fetch(`https://parekso-temp.pages.dev/api/emails/${emailId}/messages`)
  const { data: { messages } } = await msgs.json()
  console.log(`Received ${messages.length} messages`)
  
  // Check for OTP codes
  messages.forEach(msg => {
    if (msg.otp_code) {
      console.log('OTP Code:', msg.otp_code)
    }
  })
}, 10000)
Generate Custom Email
POST
Create a new temporary email address with custom name

Endpoint

POST /api/emails/generate

Request Body

{
  "customName": "myemail",       // Required: 3-30 lowercase letters/numbers
  "domain": "jigidaw.my.id"      // Required: exact hostname from GET /api/emails/domains
}

Validation Rules

  • Custom name must be 3-30 characters
  • Only lowercase letters and numbers allowed
  • No special characters or spaces
  • Domain must be one of the active selectable hostnames returned by GET /api/emails/domains

Success Response (200)

{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "myemail@jigidaw.my.id",
    "domain": "jigidaw.my.id",
    "localPart": "myemail",
    "subdomain": "jigidaw.my.id",
    "createdAt": "2025-01-15T10:30:00Z",
    "expiresAt": null,
    "isActive": true
  }
}

Error Responses

// 400 Bad Request - Invalid name
{
  "error": "Email name must be between 3 and 30 characters"
}

// 400 Bad Request - Unsupported domain
{
  "error": "Unsupported domain"
}

// 409 Conflict - Email exists
{
  "error": "Email address already exists and is active"
}

Example (cURL)

curl -X POST https://parekso-temp.pages.dev/api/emails/generate \
  -H "Content-Type: application/json" \
  -d '{"customName": "myemail", "domain": "poam.jigidaw.my.id"}'

Example (JavaScript)

const response = await fetch('https://parekso-temp.pages.dev/api/emails/generate', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    customName: 'myemail',
    domain: 'poam.jigidaw.my.id'
  })
});

const result = await response.json();
console.log(result.data.email); // myemail@poam.jigidaw.my.id
🚀 Try It Live
Edit the code below and click 'Run Code' to test the API