accounts.getLimits
Get an account's limits and enforcement state.
Returns every plan limit of the account with its resolved threshold (the account's own number, or the platform default it follows), enforcement state, stored value, and whether the number is an operator-agreed limit; plus the vetting label and billing tier. enforcement is enforced, log_only (shadow mode: measured without refusing), or off (limit null). Shadow mode preserves the numeric threshold. This describes configured behavior, not transient ledger health or other refusal checks. The mailbox ceiling and the mailbox, address and domain creation limits bound the account's own key; an operator's system key is not held to them. Current usage is on send-usage, receive-usage and storage-usage.
openemail.accounts.getLimits(
accountId: string,
options?: CallOptions,
): ApiPromise<AccountLimits>It calls GET /accounts/{accountId}/limits: Get an account's limits and enforcement state in the API reference.
Example
const accountLimits = await openemail.accounts.getLimits(accountId)Arguments
| Argument | Type | Description |
|---|---|---|
accountId | string | Account ULID identifier. The path's {accountId}. |
Options
It takes no options of its own. Every call also takes signal, timeout, retry and headers, which say how that one call is sent (call options).
Answer
Awaited, it is the API's JSON, AccountLimits. It is an ApiPromise: .withResponse() gives the same with the Response it came in, for its headers.
Errors
| Status | What it means |
|---|---|
401 | unauthorized: the bearer credential is missing, malformed, expired, or revoked. Carries a WWW-Authenticate: Bearer challenge |
404 | Account not found or not accessible to this principal |
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) |
A failed call rejects with a RequestError: its status, and its code, the API's error. Decide on the code: one status covers several.
Types
It names these types of the API, each on a page of its own: AccountLimits.