Authentication — replace YOUR_TOKEN with your user API key (tm_live_...).

?token=YOUR_TOKEN
GET

Profil account

/api/v1/me

Returns the current account profile and API key status, including expiry time.

Parameters
NameInRequiredDescription
tokenqueryrequiredUser API key
Example request
https://mail.tgx-app.com/api/v1/me?token=YOUR_TOKEN
Example response
{
  "success": true,
  "data": {
    "account_id": 3,
    "username": "clienta",
    "role": "user",
    "api_key": {
      "id": 3,
      "prefix": "tm_live_0d5b...0e10",
      "expires_at": "2026-09-13T01:06:33Z"
    }
  }
}

Watch api_key.expires_at to know when the key expires.

GET

Mail domains

/api/v1/catalog

Lists active domains you can use when creating a temporary address.

Parameters
NameInRequiredDescription
tokenqueryrequiredUser API key
Example request
https://mail.tgx-app.com/api/v1/catalog?token=YOUR_TOKEN
Example response
{
  "success": true,
  "data": {
    "domains": [
      { "id": 2, "domain": "mail.tgx-app.com", "is_active": true }
    ]
  }
}

Use a domain value from this list when creating an address.

POST

New mailbox

/api/v1/mailbox/generate

Creates a new temporary email address. You can pick a domain, or let the system choose one at random.

Parameters
NameInRequiredDescription
tokenqueryrequiredUser API key
domainqueryoptionalManaged domain. Empty = random active domain
Example request

1) With a specific domain

https://mail.tgx-app.com/api/v1/mailbox/generate?token=YOUR_TOKEN&domain=mail.tgx-app.com

2) Without domain (random active domain)

https://mail.tgx-app.com/api/v1/mailbox/generate?token=YOUR_TOKEN

Method must be POST (body optional if using query params).

Example response
{
  "success": true,
  "data": {
    "address": "silentwolf5209@mail.tgx-app.com",
    "created_at": "2026-08-14T01:05:38+08:00",
    "source_domain": "mail.tgx-app.com"
  }
}
GET

My mailbox

/api/v1/mailbox

Lists all temporary addresses already created with this API key.

Parameters
NameInRequiredDescription
tokenqueryrequiredUser API key
pagequeryoptionalDefault 1
limitqueryoptionalDefault 20
Example request
https://mail.tgx-app.com/api/v1/mailbox?token=YOUR_TOKEN&page=1&limit=20
Example response
{
  "success": true,
  "data": {
    "mailboxes": [
      {
        "address": "silentwolf5209@mail.tgx-app.com",
        "account_id": 4,
        "source_domain": "mail.tgx-app.com",
        "created_at": "2026-08-14T01:05:38+08:00"
      }
    ],
    "page": 1,
    "limit": 20,
    "total": 1
  }
}
GET

Read inbox

/api/v1/mailbox/:address/emails

Lists emails received by one address (sender, subject, and short excerpt).

Parameters
NameInRequiredDescription
addresspathrequiredTemporary address from New mailbox
tokenqueryrequiredUser API key
latestqueryoptionaltrue = newest email only (OTP)
pagequeryoptionalDefault 1
limitqueryoptionalDefault 50, max 200
Example request
https://mail.tgx-app.com/api/v1/mailbox/silentwolf5209@mail.tgx-app.com/emails?token=YOUR_TOKEN&latest=true

No webhooks. Poll every 3–5 seconds until mail arrives.

Example response
{
  "success": true,
  "data": {
    "address": "silentwolf5209@mail.tgx-app.com",
    "emails": [
      {
        "id": "11111111-2222-3333-4444-555555555555",
        "from": "noreply@service.com",
        "subject": "Your OTP code",
        "excerpt": "Verification code: 482913",
        "created_at": "2026-08-14T01:06:10+08:00",
        "is_read": false
      }
    ],
    "page": 1,
    "limit": 50,
    "total": 1
  }
}