Skip to main content
Use the account API to read usage, quota state, usage history, and subscription readiness, and to sign out. Account reads use an account bearer. Never use a project ingest key for an account request. Never use an account credential as SDK or ingest configuration. Errors use the standard API error envelope. A read without valid account authentication returns 401 with code: "unauthorized". Do not show that failure as zero usage, an empty graph, or a free plan. An unsupported method returns 405 with code: "method_not_allowed", and next names the supported request.

Account usage

GET /api/account/usage is the canonical usage and quota endpoint. Use it for usage totals, limits, reset time, quota state, and breakdowns by project and telemetry stream. Do not calculate usage from SDK files, CLI files, or client counters. The CLI command logbrew usage reads this endpoint. See the CLI reference.
Example response with synthetic values:

Quota states

Use state for the main branch. limit is null only when state is ok. next_action.state, next_action.limit, and next_action.reset_at repeat the top-level values. An account usage limit is not an API rate limit. When ingestion exceeds the allowance, ingestion returns usage_limit_exceeded. When a client sends too many requests, the API returns rate_limited. See API errors. The response is a snapshot. Read it again after an account change.
GET /api/logs/usage is a legacy mobile compatibility response with bytes_used, limit_bytes, and month. Use GET /api/account/usage for new integrations.

Usage history

GET /api/account/usage/history returns bounded, zero-filled usage buckets for graphs and reports. Set interval to one supported value:
Use current.reset_at for the allowance reset. Do not use the end of the history window. The last bucket can contain a period that is not complete. Plot events and bytes as separate series because they use different units. The buckets contain usage, not cost. Do not label the graph as spending, invoices, or API requests. An unsupported interval returns 422:

Subscription readiness

GET /api/account/subscription is read-only. Use it to decide whether to enable paid-plan or organization controls. Use the usage endpoint for quota state.
A free account returns these values: Enum values: Tier values are identifiers, not display names. Keep them unchanged in a localized client. Check organization_creation_allowed before you enable organization creation. This endpoint does not create organizations, send invitations, change roles, or change billing.

Sign out

Choose the smallest scope that matches the task. These endpoints do not delete the account or its projects, rotate ingest keys, or revoke a third-party login provider’s grant.

One app or CLI login

Send the request from the client that holds the refresh token:
Never ask a person or agent to print or paste a refresh token. A successful response is 200:
This revokes one refresh-token family. Other logins on the account are not changed. After the response, the client removes its local credentials. If the token is invalid or expired, the response is 401 with code: "unauthorized". Remove the local credentials in that case too. logbrew logout uses this endpoint.

Every LogBrew login

This request signs out every client on the account. Get the account owner’s approval before an agent sends it.
A successful response is 200:
revoked_before is inclusive. LogBrew rejects access, browser, and refresh credentials issued at or before that time. Current live-feed sessions end, and the browser session cookie is cleared. A sign-in after that time stays valid. Each client must remove its local LogBrew credentials and sign in again. If the response is lost, do not report that all logins were revoked. For more recovery steps, read Secure a compromised account.

Browser session

POST /api/auth/web/logout clears the browser logbrew_session cookie and returns 204 No Content with no body. Call it from the browser. Do not copy the session cookie into a command. This request does not sign out other clients.