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-* │◄────│ │
└──────────┘ └──────────────┘ └──────────────────┘- Create an account via
POST /api/v1/temp-mail/accounts - Fetch messages via
GET /api/v1/temp-mail/accounts/{accountId}/messages - Read full message via
GET /api/v1/temp-mail/accounts/{accountId}/messages/{messageId}
Providers
Devora supports two temporary email providers with different feature sets:
| Feature | Mail.tm | MoeMail |
|---|---|---|
| Authentication | Session cookie | Session cookie |
| Password | ✅ Required | ❌ Not required |
| Token | ✅ Required for messages | ❌ Not required |
| Custom Address | ✅ Yes | ❌ Auto-generated |
| Domain Selection | ❌ Auto-assigned | ✅ Choose from available |
| Message Retention | Permanent (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_hereBase URL
https://devora.my.id/api/v1/temp-mailEndpoints Overview
| Endpoint | Method | Description |
|---|---|---|
/domains | GET | List available domains |
/accounts | GET | List accounts owned by the API key user |
/accounts | POST | Create Mail.tm or MoeMail account |
/accounts/{accountId} | GET | Get account detail |
/accounts/{accountId} | DELETE | Delete account from Devora |
/messages | GET | Query-style inbox metadata endpoint |
/accounts/{accountId}/messages | GET | Account-scoped inbox metadata endpoint |
/accounts/{accountId}/messages/{messageId} | GET | Read full message content, including MoeMail HTML |
/token | POST | Generate Mail.tm token |
/image | GET | Proxy 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 linkageTempMailMessage— 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
| Status | Meaning | When It Happens |
|---|---|---|
400 | Bad Request | Missing required fields (address, password) |
401 | Unauthorized | Missing or invalid auth token / API key |
404 | Not Found | Account or message ID does not exist |
500 | Internal Server Error | Upstream 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
autoSyncis enabled. Messages are also stored locally vialocalStoragefor the active session.