Skip to Content
GET
/api/v1/accounts/{accountId}/usage

Returns daily storage, message counts, and API request meter metrics for an account over a UTC date range.

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: [].

Path Parameters

accountId*string

Account ULID identifier

Query Parameters

from?string

First UTC day in YYYY-MM-DD format (default: 29 days ago)

to?string

Last UTC day in YYYY-MM-DD format (default: today)

requests?string

Set to 'true' to include detailed API request count breakdown by resource and principal

Value in"true""false"

Response Body

Daily usage metrics ascending by date

application/json
  1. response
accountId*string

Account ID

days*array<>

Daily usage metrics for each day in range

from*string

Start date of queried usage range (YYYY-MM-DD)

requests?array<>

Summary of API calls broken down by resource and surface

to*string

End date of queried usage range (YYYY-MM-DD)

Example Request
curl -X GET 'https://api.open.email/api/v1/accounts/string/usage'
Example Response
{
  "accountId": "string",
  "days": [
    {
      "calendarObjects": 0,
      "closedAt": 0,
      "contactObjects": 0,
      "day": "string",
      "estimated": true,
      "eventsPushedImap": 0,
      "eventsPushedJmap": 0,
      "eventsPushedWeb": 0,
      "forwardedMessages": 0,
      "inboundBytes": 0,
      "inboundDeliveries": 0,
      "mailBytes": 0,
      "mailboxes": 0,
      "maxDatabaseSize": 0,
      "outboundBytes": 0,
      "outboundMessages": 0,
      "outboundRecipients": 0,
      "pimBytes": 0,
      "pimRelayedImap": 0,
      "pimRelayedJmap": 0,
      "pimRelayedWeb": 0,
      "reportedAt": 0,
      "requestBytesOut": 0,
      "requests": 0,
      "requestsRolledAt": 0,
      "rolledAt": 0,
      "socketsAcceptedImap": 0,
      "socketsAcceptedJmap": 0,
      "socketsAcceptedWeb": 0,
      "trashBytes": 0,
      "webhookDeliveries": 0
    }
  ],
  "from": "string",
  "requests": [
    {
      "bytesOut": 0,
      "count": 0,
      "kind": "string",
      "principal": "string",
      "resource": "string",
      "surface": "string"
    }
  ],
  "to": "string"
}