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 or the browser session. 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. The account API reports telemetry usage, not money. It does not report charges, invoices, or payment state.

Account usage

GET /api/account/usage is the canonical usage and quota endpoint. Use it for usage totals, 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. This free account has 1 project and sent only logs in the current period:

Events dropped by SDKs

Send response_version=2 to also get sdk_dropped_events. Without it, or with response_version=1, the response does not have this field.
sdk_dropped_events lists the events that SDKs reported as dropped before delivery in the current period, for example because the client queue was full. There is 1 row for each project and reason:
Dropped events never reached LogBrew. They are not billed, and they do not count toward usage, by_project, or by_stream. The array is empty when no SDK reported a drop. The array also counts the OTLP records that LogBrew rejected, with the reason otlp_rejected_record, or usage_limit_exceeded at the plan limit. These records reached LogBrew but LogBrew did not store them. They are not billed. See Send OpenTelemetry data.

New-account offer

Earlier accounts got the Pro allowances free for 6 months, counted from sign-up, or from 2026-10-22 for accounts that existed then. They keep the offer until its ends_at. New accounts start on Free and do not get this offer. Pro includes a 1-month free trial. Add a card to start it; it renews monthly until you cancel. Send response_version=3 to also get offer. Versions 1 and 2 do not have this field. Version 3 also has sdk_dropped_events.
offer is null when no offer is active. Otherwise it has these fields:
While an offer is active, limits.retention_days, state, limit, percent_used, and next_action use the larger of the account’s own plan and the offer. plan still shows the account’s own plan. After ends_at, the account uses its own plan again. Versions 1 and 2 follow the same allowances, but they do not show the offer. The billing overview, GET /api/billing/overview, has the same offer field. It also has pro_trial_available, which is true when a Pro checkout starts the free trial.

Quota states

Use state for the main branch. limit is null only when state is ok. This table applies to versions 2 and 3. Version 1, the default, has 2 differences: warning is also true in the blocked state, and in the warning state next_action.target is account_usage. next_action.state, next_action.limit, and next_action.reset_at repeat the top-level values. The next_action.code values also include check_usage_limits with the target account_usage. If a client gets that pair, read the usage again and show next. LogBrew measures each telemetry type against its own allowance. limit groups them:
  • events covers issue events and trace spans.
  • bytes covers log bytes and metric bytes.
If one allowance is blocked and another is in warning, limit names the blocked allowance. The warning state starts when usage reaches warning_threshold of an allowance. The blocked state starts when usage reaches the allowance. The next text can change, for example when plans are not for sale. The next_action values do not change. Localize from next_action. Do not parse next. An account usage limit is not an API rate limit. When ingestion exceeds an allowance, the ingest request returns 429 with usage_limit_exceeded, and the body adds limit and reset_at. In that error, limit names the exact allowance: issue_events, log_bytes, metric_bytes, or trace_spans. LogBrew rejects the complete request. Do not send that telemetry type again until reset_at or until the plan changes. 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. If you omit interval, the API uses monthly. The route accepts no other query key.
This yearly response uses synthetic data for a request in June 2026. All usage occurred in June:
Use current.reset_at for the allowance reset. Do not use the end of the history window. current is not the sum of the buckets, and its dates can be different from the window dates. The last bucket contains the current calendar period, which is not complete. Its future end time does not mean that LogBrew measured future usage. A bucket with zeros means that LogBrew counted no usage in that bucket. In a bucket, usage.projects counts the projects that have usage in that bucket. Do not add these counts to get the number of projects. Use current.usage.projects for the number of owned projects. 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:
An unknown query key also returns 422 with validation_failed.

Plans and allowances

GET /api/billing/catalog lists the plans. It needs no authentication. Every plan has every feature. Every plan has unlimited members and projects. Plans differ in volume and retention. Allowances reset each billing month. 1 GB is 1,000,000,000 bytes. You buy Pro and Business through checkout, and checkout_available is true. For Enterprise, write to the plan’s quote_email for a quote. An account with an active new-account offer gets the Pro allowances free until the offer ends. The catalog and the billing overview use the tier values developer, team, business, and enterprise. The usage and subscription responses use free, pro, and scale. The Business and Enterprise plans are both scale.
The response lists the plans in this order. This example shows the Pro plan:

Data retention

Retention is the number of days that LogBrew keeps an account’s telemetry. The account’s retention is the larger of its plan and an active new-account offer. An Enterprise contract sets its own retention.
  • Reads return only telemetry inside the retention.
  • Each day, LogBrew deletes the account’s telemetry that is older than the retention plus 1 day.
  • After a downgrade or the end of an offer, the shorter retention applies at the next daily deletion.

Subscription readiness

GET /api/account/subscription is read-only. Use it to decide whether to enable organization controls. Use the usage endpoint for quota state.
A free account returns this response. The account_id is synthetic:
The value 9007199254740991 in members_per_organization and projects_per_organization means unlimited. It is the largest integer that JSON clients read exactly. Show “Unlimited” for it. Only the number of organizations that an account owns can block organization creation. next is display text. Show the returned text, or localize from next_action. Do not hard-code a plan name from next. Enum values: The API does not return the blockers subscription_required and subscription_inactive. Each blocker has one next_action pair: 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.

Organization invitations

An organization owner or admin invites a teammate by email. LogBrew sends the teammate an email with a link to the invitation. The invitation expires after 7 days. These endpoints show the invitation to the invited account before it accepts. An invitation is yours when it was sent to the email address of your account or of a sign-in method linked to your account. List your pending invitations:
The response lists pending invitations that did not expire, newest first, up to 100. The IDs are synthetic:
Read one invitation from its link:
The response is one invitation with the same fields. Only the invited account can read an invitation. Another account, an unknown invitation ID, and an unknown organization all get the same 404 with code: "not_found". Sign in with the invited email address, then try again. To accept, send POST to accept_path with the invited account. A second accept by the same account returns the same membership. An expired or revoked invitation returns 422 with code: "invite_invalid". Ask an owner or admin for a new invitation. An account can send at most 20 invitations each UTC day, across all its organizations. The next invitation returns 429 with code: "invitation_limit_exceeded" and limit: "invitations_per_inviter_per_day". Wait for reset_at. See API errors.

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. Set Content-Type: application/json:
Never ask a person or agent to print or paste a refresh token. A successful response is 200:
This revokes one refresh-token family. LogBrew rejects later refreshes for that login. Other logins on the account do not change. An access token that the client already has stays valid until it expires. If account credentials can be exposed, use Every LogBrew login. After the response, the client removes its local credentials. If you send the same valid refresh token again, the response is the same 200. If the token is invalid or expired, or is an access token, the response is 401 with code: "unauthorized" and next_action.code: "authorize_request". 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 and has millisecond precision. LogBrew rejects access tokens, browser sessions, and refresh tokens from a sign-in at or before that time. A token refreshed later from such a sign-in is also rejected. Current live-feed sessions end, and the response clears the browser session cookie. A sign-in after that time stays valid. Each client must remove its local LogBrew credentials and sign in again. Do not sign in again and repeat this request automatically. A new request also revokes the new sign-in. If the response is lost, do not report that all logins were revoked. A later 401 from an old credential does not replace the success response. 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, and it does not revoke a copy of the cookie value. To revoke every session, use Every LogBrew login.

Recover from a sign-out error

For telemetry routes, filters, and pagination, read the Telemetry API.