API Documentation

// REST API FOR DEVELOPERS & BOT INTEGRATION

BASE_URL = https://tmailku.com
GENERATOR API KEY PUBLIK // GRATIS & INSTAN

Dapatkan API Key gratis secara mandiri untuk integrasi bot Telegram, skrip automasi Python, cURL, maupun pengujian backend tanpa harus login ke dashboard admin.

Batas: 120 req/m Berlaku: 30 Hari Proteksi: Maks 5 Key / IP / 24 Jam
API KEY BERHASIL DIGENERATE Sisa kuota: 4 lagi hari ini
tm_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Bot OTP 120 req/menit Berlaku s/d -
CONTOH PENGGUNAAN CURL DENGAN KUNCI ANDA:
curl -H "X-API-Key: tm_live_..." "https://tmailku.com/api/emails/user@tmailku.com/latest"
GET /api/random-username Generate random unique username

Generates a random unique username (adj+noun+number) suitable for temporary emails.

RESPONSE
{ "username": "braveatlas042" }
GET /api/domains List verified domains

Returns all verified domains available for creating email addresses.

RESPONSE
{ "success": true, "domains": [ { "domain": "tmailku.com", "status": "verified" } ] }
GET /api/domains/random Random verified domain list

Returns public verified domains for random email generation.

GET /api/domain/verify/:domain Verify domain MX record

Checks DNS MX record for a domain and auto-registers it if verified.

EXAMPLE
GET /api/domain/verify/example.com
RESPONSE
{ "success": true, "domain": "example.com", "verified": true, "mx": "mail.tmailku.com" }
GET /api/public/emails/:address Get inbox emails (public)

Returns all emails received at the specified address. No authentication required.

PARAMS
?limit=50 // Max 100
EXAMPLE
curl "https://tmailku.com/api/public/emails/user@tmailku.com"
GET /api/sse/:address Real-time email notifications (SSE)

Server-Sent Events stream for real-time email notifications. Receives 'new-email' events when a new email arrives.

JAVASCRIPT EXAMPLE
const es = new EventSource('/api/sse/user@tmailku.com'); es.onmessage = (e) => { const data = JSON.parse(e.data); if (data.type === 'new-email') { console.log('New email:', data.email.subject); } };
GET /api/emails/:address Get inbox (authenticated) API KEY

Authenticated version. Requires X-API-Key header.

HEADER
X-API-Key: your-api-key-here
GET /api/emails/:address/latest Get latest email API KEY

Returns only the most recent email for the given address. Useful for bots waiting for verification codes.

PYTHON EXAMPLE
import requests r = requests.get( "https://tmailku.com/api/emails/user@tmailku.com/latest", headers={"X-API-Key": "your-key"} ) email = r.json()["email"] print(email["subject"], email["body_text"])
GET /api/emails/:address/:id Get single email API KEY

Get a specific email by ID, including attachments list. Marks the email as read.

DELETE /api/emails/:address/:id Delete an email API KEY

Permanently deletes an email and its attachments from the server.

CURL EXAMPLE
curl -X DELETE \ -H "X-API-Key: your-key" \ "https://tmailku.com/api/emails/user@tmailku.com/abc123"
GET /api/public/emails/:address Get private domain inbox (with X-Domain-Key) TMAIL-KEY

If your domain is configured as a Private Domain via TXT record, provide the X-Domain-Key header or key parameter to access its inbox.

CURL EXAMPLE
curl -H "X-Domain-Key: your_secret_key" "https://tmailku.com/api/public/emails/test@privatedomain.com"
GET /api/sse/:address?key=:tmail_key Real-time SSE stream for private domain TMAIL-KEY

Open a Server-Sent Events stream for a private domain address by appending the key parameter.

JAVASCRIPT EXAMPLE
const es = new EventSource('/api/sse/test@privatedomain.com?key=your_secret_key'); es.onmessage = (e) => { const data = JSON.parse(e.data); if (data.type === 'new-email') console.log(data.email); };
GET /api/user-dashboard/sse?key=:tmail_key Multi-domain real-time stream (All domains under key) TMAIL-KEY

Receives instant push notifications for ALL emails sent to any custom domain sharing the same tmail-key.

JAVASCRIPT EXAMPLE
const es = new EventSource('/api/user-dashboard/sse?key=your_secret_key'); es.onmessage = (e) => { const data = JSON.parse(e.data); if (data.type === 'new-email') { console.log('New email on domain:', data.domain, data.email.subject); } };