Developer Portal
REST API v1 Documentation & Playground
Prefix: /api/v1 · OpenAPI JSON: /api/v1/openapi.json
tm_live_ Productiontm_test_ Sandbox
Authentication, Scopes & Sandbox Isolation
Authenticate commercial API calls by sending X-API-Key: tm_live_... (production) or X-API-Key: tm_test_... (sandbox, zero wallet deductions). All mutating financial & rental routes accept Idempotency-Key.
account:readwallet:readdomains:readmailbox:readmailbox:createmailbox:renewmailbox:deletemessage:readmessage:deletewebhook:manageMulti-Language Integration Examples (9 Languages + Official SDKs)
curl -X POST http://VPS_IP:3000/api/v1/mailboxes \
-H "X-API-Key: tm_live_your_key" \
-H "Idempotency-Key: req-001" \
-H "Content-Type: application/json" \
-d '{"domainId":"<domain_id>","durationMinutes":60}'Interactive API Playground
Core API Reference
| Method | Path | Scope | Description |
|---|---|---|---|
| GET | /api/v1/domains | domains:read | List active mail domains & pricing |
| GET | /api/v1/domains/{id}/availability | domains:read | Check username availability |
| POST | /api/v1/mailboxes | mailbox:create | Rent temporary mailbox (billable with live key) Billable |
| GET | /api/v1/mailboxes | mailbox:read | List owned mailboxes (cursor paginated) |
| POST | /api/v1/mailboxes/{id}/renew | mailbox:renew | Extend mailbox expiration (billable with live key) Billable |
| GET | /api/v1/mailboxes/{id}/messages | message:read | List messages for a mailbox |
| GET | /api/v1/mailboxes/{id}/messages/{messageId}/raw | message:read | Download raw RFC 5322 EML |
| GET | /api/v1/wallet | wallet:read | Retrieve integer VND wallet balances |
| POST | /api/v1/webhooks | webhook:manage | Register HMAC-SHA256 webhook endpoint |
| GET | /api/v1/status | public | Public infrastructure component status |
Webhook HMAC-SHA256 Verification
Every delivery includes X-TempMail-Timestamp, X-TempMail-Event-Id, and X-TempMail-Signature.
expected = HMAC_SHA256(secret, timestamp + "." + rawBody)
valid = timingSafeEqual("sha256=" + expected, headerSignature)Rate Limits & Standard Error Envelope
Responses include X-Request-Id, RateLimit-Limit, RateLimit-Remaining, and Retry-After on HTTP 429.
{
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Available wallet balance is insufficient.",
"requestId": "req_a1b2c3d4"
}
}