DevoraDevoraDocs

Temp Mail

Full reference for the Devora Temp Mail API — create temporary email accounts, fetch messages, and manage inboxes programmatically.

The Temp Mail API allows you to create and manage temporary email accounts programmatically. It supports two providers: Mail.tm (default) and MoeMail. Public v1 endpoints are authenticated with your Devora API Key.


How It Works

┌──────────┐     ┌──────────────┐     ┌──────────────────┐
│  Client  │────▶│ Devora Proxy │────▶│ Mail.tm / MoeMail│
│          │◄────│ /api/temp-*  │◄────│                  │
└──────────┘     └──────────────┘     └──────────────────┘
  1. Create an account via POST /api/v1/temp-mail/accounts
  2. Fetch messages via GET /api/v1/temp-mail/accounts/{accountId}/messages
  3. Read full message via GET /api/v1/temp-mail/accounts/{accountId}/messages/{messageId}

Providers

Devora supports two temporary email providers with different feature sets:

FeatureMail.tmMoeMail
AuthenticationSession cookieSession cookie
Password✅ Required❌ Not required
Token✅ Required for messages❌ Not required
Custom Address✅ Yes❌ Auto-generated
Domain Selection❌ Auto-assigned✅ Choose from available
Message RetentionPermanent (stored in DB)Temporary
DB Persistence✅ Full✅ Account + metadata
Full HTML Detail✅ Yes✅ Yes via v1 detail

[!NOTE] The UI defaults to Mail.tm but allows switching to MoeMail at any time. MoeMail domains are fetched dynamically from /api/temp-mail/domains.


Authentication

For external API access, include your Devora API Key:

Authorization: Bearer your_api_key_here

Base URL

https://devora.my.id/api/v1/temp-mail

Endpoints Overview

EndpointMethodDescription
/domainsGETList available domains
/accountsGETList accounts owned by the API key user
/accountsPOSTCreate Mail.tm or MoeMail account
/accounts/{accountId}GETGet account detail
/accounts/{accountId}DELETEDelete account from Devora
/messagesGETQuery-style inbox metadata endpoint
/accounts/{accountId}/messagesGETAccount-scoped inbox metadata endpoint
/accounts/{accountId}/messages/{messageId}GETRead full message content, including MoeMail HTML
/tokenPOSTGenerate Mail.tm token
/imageGETProxy Mail.tm inline images

Quick Start

1. Create a Mail.tm Account

curl -X POST https://devora.my.id/api/v1/temp-mail/accounts \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "[email protected]",
    "password": "securepassword123"
  }'

Response 201:

{
  "id": "acb123...",
  "address": "[email protected]",
  "token": "eyJhbGciOi...",
  "createdAt": "2026-04-23T12:00:00.000Z"
}

[!IMPORTANT] Save the token — it is required to fetch messages for Mail.tm accounts.

2. Generate a MoeMail Account

curl -X POST https://devora.my.id/api/v1/temp-mail/accounts \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "moemail",
    "domain": "zenra.my.id"
  }'

Response:

{
  "success": true,
  "provider": "moemail",
  "account": {
    "id": "abc123",
    "address": "[email protected]",
    "createdAt": "2026-04-23T12:00:00.000Z"
  }
}

3. Fetch Messages

This endpoint returns inbox metadata only for both Mail.tm and MoeMail. Use one of the returned message IDs for the next step.

curl -X GET "https://devora.my.id/api/v1/temp-mail/accounts/ACCOUNT_ID/messages" \
  -H "Authorization: Bearer your_api_key_here"

4. Read Full Message

curl -X GET "https://devora.my.id/api/v1/temp-mail/accounts/ACCOUNT_ID/messages/MESSAGE_ID" \
  -H "Authorization: Bearer your_api_key_here"

For MoeMail, this returns full html and text content, matching the Temp Mail UI message reader.

{
  "id": "MESSAGE_ID",
  "from": {
    "name": "Sender",
    "address": "[email protected]"
  },
  "subject": "Verification Code",
  "text": "Your code is 123456",
  "html": ["<p>Your code is <strong>123456</strong></p>"]
}

Database Persistence

Mail.tm accounts and messages are persisted in Devora's database:

  • TempMailAccount — stores account ID, address, password, token, and user linkage
  • TempMailMessage — stores message metadata (from, subject, intro, seen status, createdAt)
  • TempMailStats — tracks global statistics (emailsGenerated, messagesReceived)

[!TIP] Even if Mail.tm is unreachable, Devora falls back to the database to display cached messages.


Error Handling

StatusMeaningWhen It Happens
400Bad RequestMissing required fields (address, password)
401UnauthorizedMissing or invalid auth token / API key
404Not FoundAccount or message ID does not exist
500Internal Server ErrorUpstream provider error or DB failure

UI Sync

The Temp Mail dashboard in Devora provides:

  • Account Generator — one-click email creation with provider selection
  • Inbox Viewer — real-time message list with auto-refresh (5s polling)
  • Message Reader — full HTML/text content viewer
  • Account History — all previously created accounts with search
  • Domain Selector — dynamic MoeMail domain picker
  • Statistics — emails generated and messages received counters

[!NOTE] The dashboard auto-syncs messages when autoSync is enabled. Messages are also stored locally via localStorage for the active session.

On this page