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:manage

Multi-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

MethodPathScopeDescription
GET/api/v1/domainsdomains:readList active mail domains & pricing
GET/api/v1/domains/{id}/availabilitydomains:readCheck username availability
POST/api/v1/mailboxesmailbox:createRent temporary mailbox (billable with live key) Billable
GET/api/v1/mailboxesmailbox:readList owned mailboxes (cursor paginated)
POST/api/v1/mailboxes/{id}/renewmailbox:renewExtend mailbox expiration (billable with live key) Billable
GET/api/v1/mailboxes/{id}/messagesmessage:readList messages for a mailbox
GET/api/v1/mailboxes/{id}/messages/{messageId}/rawmessage:readDownload raw RFC 5322 EML
GET/api/v1/walletwallet:readRetrieve integer VND wallet balances
POST/api/v1/webhookswebhook:manageRegister HMAC-SHA256 webhook endpoint
GET/api/v1/statuspublicPublic 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"
  }
}