API Documentation

Authentication Required

Please login to view your API token and use the API.

Every endpoint accepts the type=json|text parameter. Text mode helps when a JSON parser is unavailable: getEmail, for instance, returns only email:password rows (one per line, no OK prefix).

Age-based Pricing

Account price depends on how long the account has been in inventory. Use the age parameter to select a specific tier. If not specified, the cheapest available account will be returned.

Fresh < 3 hours $0.0014
Medium 3h – 3 days $0.003
Aged > 3 days $0.01

Balance

GET

/userBalance
Returns the current balance of the authenticated user.

Parameter Required Description
token Yes User API token
type No `json` (default) or `text`

Request example

https://api.apimail.me/userBalance?token=YOUR_API_TOKEN&type=text

Response (JSON)

{
  "status": "OK",
  "balance": "12.3456"
}

Response (TEXT)

OK|12.3456

Get accounts

GET

/getEmail
Returns ready-to-use email accounts. Price depends on account age: fresh (<3h) $0.0014, medium (3h-3d) $0.003, aged (>3d) $0.01. If age is not specified, the cheapest available account is returned.

Parameter Required Description
token Yes User API token
count No Number of accounts (1–50, default 1)
domain No Domain. If omitted, cheapest from any domain
age No Age tier: `fresh` (<3h, $0.0014), `medium` (3h-3d, $0.003), `aged` (>3d, $0.01). If omitted, cheapest available
type No `json` or `text`

Request example

https://api.apimail.me/getEmail?token=YOUR_API_TOKEN&count=1&domain=outlook.com&age=fresh

Response (JSON)

{
  "status": "OK",
  "count": 1,
  "domain": "outlook.com",
  "age": "fresh",
  "total_price": "0.0014",
  "currency": "USD",
  "accounts": [
    {"email": "u8123@outlook.com", "password": "pass|RefreshToken|ClientId", "domain": "outlook.com", "price": "0.0014", "age": "fresh"}
  ]
}

Response (TEXT)

u8123@outlook.com:pass|RefreshToken|ClientId

Retrieve purchased accounts again

GET

/purchasedEmails
Returns accounts purchased within a specific expense (`payment_id`) while the 7-day retention period is active.

Parameter Required Description
token Yes User API token
payment_id Yes Expense ID (from the `payments` table)
type No `json` or `text`

Request example

https://api.apimail.me/purchasedEmails?token=YOUR_API_TOKEN&payment_id=123&type=json

Response (JSON)

{
  "status": "OK",
  "payment_id": 123,
  "expires_at": "2025-11-21T10:00:00Z",
  "accounts": [
    {"email": "u8123@outlook.com", "password": "pass|RefreshToken|ClientId", "domain": "outlook.com", "price": "0.0014"}
  ]
}

Response (TEXT)

u8123@outlook.com:pass|RefreshToken|ClientId

Domain availability

GET

/domainAvailability
Public statistics for available accounts per domain with age breakdown. Use `domain` and `age` parameters to filter results.

Parameter Required Description
domain No Filter by specific domain (e.g., `outlook.com`)
age No Filter by age tier: `fresh`, `medium`, or `aged`
type No `json` (default) or `text`

Request example

https://api.apimail.me/domainAvailability?domain=outlook.com&age=fresh&type=json

Response (JSON)

  {
    "status": "OK",
    "updated_at": "2025-01-03T12:00:00Z",
    "domains": [
      {
        "domain": "outlook.com",
        "available": 20,
        "age": "fresh",
        "price": 0.0014
      }
    ],
    "totals": {
      "available": 20,
      "fresh_count": 20
    },
    "filters": {
      "domain": "outlook.com",
      "age": "fresh"
    },
    "age_prices": {
      "fresh": 0.0014,
      "medium": 0.003,
      "aged": 0.01
    }
  }

Response (TEXT)

OK