Skip to Content
GET
/api/v1/identities

Lists mailboxes for the authenticated account. Set state=deleted to list restorable tombstones (deleted mailboxes still within the undo window). A SYSTEM caller lists every mailbox on the deployment, and may narrow to one tenant with accountId. Under the partitioned directory a system caller's deployment-wide listing walks the accounts in turn: its rows come account by account, its pages are bounded in work, so one may hold fewer than limit rows while more follow, and the list ends only when nextCursor is absent.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Two credential kinds share this scheme; GET /api/v1/auth/whoami answers which one you hold and what it reaches.

oek_… API key (minted by POST /api/v1/api-keys; shown once at mint). role: account reaches the full account surface: the directory (domains, routes, patterns, api-keys, accounts, address lists) plus every mailbox the account owns. role: system additionally reaches the operator surface, which is documented separately.

oemp_… mailbox app password (minted by POST /api/v1/identities/{identityId}/credentials). Reaches ONE mailbox: its messages, labels, threads, search, sync, send, filters and PIM collections. Directory routes refuse it with 403 insufficient_scope.

Refusal vocabulary: a missing, malformed, expired, or revoked credential answers 401 unauthorized with a WWW-Authenticate: Bearer challenge; a VALID credential outside its scope answers 403 (insufficient_scope for an app password on a directory route, system_credentials_required where only the operator may call). The public routes (health, branding, token-in-path capabilities) declare security: [].

Query Parameters

accountId?string

System callers only: list just this account's mailboxes (ignored for account principals, which always see their own)

state?string

deleted: list restorable tombstones instead of live mailboxes. suspended: only live mailboxes the account owner has suspended, pending ones included (one account's listing: an account key, or a system key with accountId)

Value in"deleted""suspended"
receiveHold?string

Only live mailboxes whose receiveHold is this value (none selects the receiving ones), pending ones included; combines with state=suspended. One account's listing: an account key, or a system key with accountId (400 account_required otherwise). With state=deleted it is refused (400 validation_failed) rather than ignored

Value in"none""paused""disabled"
address?string

Exact primary-address match (normalized) — the point lookup that saves a client walking the whole account to resolve one address. Live listing only

domain?string

Only mailboxes whose primary address is on this domain. Live listing only

q?string

Case-insensitive substring over the primary address. Live listing only

count?string

Also return total: the full COUNT over the same filters, so 'N mailboxes on this domain' is one call instead of a walk. Opt-in because the default keyset page deliberately carries no totals

Value in"true""false"
usage?string

Also return each row's SAMPLED storage (usedBytes, trashBytes, pimBytes, messageCount, databaseSize, usageAt, usageStale) from the daily usage ledger — ONE call for the whole page, never a per-row stat read. These are as of usageAt, not live: a mailbox the sweep has not reached yet omits them entirely, and a client must render that as blank rather than as zero. Live figures are GET /mailboxes/:id. Live listing only

Value in"true""false"
limit?integer

Page size (default 100)

Range1 <= value <= 200
cursor?string

Opaque page cursor from a previous response

Response Body

Mailboxes page (live rows, or restorable tombstones when state=deleted); nextCursor present when a further page exists

application/json
  1. response
identities*array<>
nextCursor?string

Opaque cursor for the next page; absent on the last page

total?integer

Full filtered COUNT — present only when count=true was requested

Formatint64
Example Request
curl -X GET 'https://api.open.email/api/v1/identities'
Example Response
{
  "identities": [
    {
      "accountId": "string",
      "createdAt": 0,
      "ephemeral": true,
      "groupAddress": "string",
      "hasMailStore": true,
      "id": "string",
      "permittedRecipients": [
        "string"
      ],
      "primaryAddress": "string",
      "provisioningPending": true,
      "quotaBytes": 0,
      "receiveHold": "paused",
      "receiveHoldAt": 0,
      "receiveHoldPending": true,
      "retentionDays": 0,
      "semantic": true,
      "sendHold": "disabled",
      "sendMsgsPerDay": 0,
      "sendMsgsPerHour": 0,
      "sendRcptsPerDay": 0,
      "sendRcptsPerHour": 0,
      "suspendedAt": 0,
      "suspensionPending": true,
      "databaseSize": 0,
      "messageCount": 0,
      "pimBytes": 0,
      "trashBytes": 0,
      "usageAt": 0,
      "usageStale": true,
      "usedBytes": 0
    }
  ],
  "nextCursor": "string",
  "total": 0
}