API Documentation

// REST API FOR DEVELOPERS & BOT INTEGRATION

BASE_URL = https://tmailku.com
GET /api/random-username Generate random username

Returns a randomly generated username for creating temporary email addresses.

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"