# Get account storage pool usage

Returns total stored bytes summed across all mailboxes in an account against the configured storage quota.

## `GET /api/v1/accounts/{accountId}/storage-usage`

### Path parameters

- `accountId` (string, required) — Account ULID identifier

### Responses

**200** — Current storage pool usage and limits

`application/json` → AccountStorageUsage

- `accountId` (string, required) — Account ULID
- `complete` (boolean, required) — True when `usedBytes` is a full sum computed by this request. False for an account large enough that the walk is paged across passes: this request advanced the sweep by one pass and `usedBytes` is the last completed sweep's cached figure (null if none has finished yet). Poll until true.
- `computedAt` (integer | null, required) — Timestamp when usage was calculated in epoch seconds, or null when no sum has ever been computed for this account. When `complete` is false this is the cached gauge's stamp, not this request's.
- `limitBytes` (integer | null, required) — Effective storage limit in bytes (null = unlimited)
- `mailboxCount` (integer <int64>, required) — Total count of mailboxes owned by this account
- `storageLimitBytes` (integer | null, required) — Configured storage limit override in bytes (null = default, 0 = unlimited)
- `usedBytes` (integer | null, required) — Total storage used across all mailboxes in bytes including trash. NULL when `complete` is false and no full sweep has ever finished for this account: the sum is deliberately withheld rather than reported short, because a partial total would under-report storage.

**401** — unauthorized: the bearer credential is missing, malformed, expired, or revoked. Carries a `WWW-Authenticate: Bearer` challenge

`application/json` → ErrorBody

**404** — Account not found or not accessible to this principal

`application/json` → ErrorBody

**503** — temporary_failure: the platform's storage could not answer just now; retry after the Retry-After window. Any operation can answer this. A write that got it may have been applied, so retry it with the same idempotency key where it takes one, or read the state back first (see Transient failures in the API description)

`application/json` → ErrorBody

### Example request

```bash
curl -X GET 'https://api.open.email/api/v1/accounts/{accountId}/storage-usage' \
  -H 'Authorization: Bearer oek_…'
```

## TypeScript SDK

[`openemail.accounts.getStorageUsage`](/docs/sdks/typescript/accounts/get-storage-usage)

```ts
const accountStorageUsage = await openemail.accounts.getStorageUsage(accountId)
```
