> ## Documentation Index
> Fetch the complete documentation index at: https://docs.logbrew.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Account API and API usage limits

> Read LogBrew account usage limits, quota history, subscription readiness, organization invitations, and sign-out responses.

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.

| Task | Endpoint |
| - | - |
| Read current usage and quota state | `GET /api/account/usage` |
| Read usage over time | `GET /api/account/usage/history` |
| Read subscription and organization readiness | `GET /api/account/subscription` |
| Read the plans and their allowances | `GET /api/billing/catalog` |
| List the organization invitations sent to you | `GET /api/account/invitations` |
| Read one invitation sent to you | `GET /api/organizations/{organization_id}/invitations/{invitation_id}` |
| Sign out one app or CLI login | `POST /api/auth/logout` |
| Revoke every LogBrew login | `POST /api/auth/logout-all` |
| Clear the browser session | `POST /api/auth/web/logout` |

Errors use the standard [API error envelope](https://docs.logbrew.co/reference/api-errors.md). 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](https://docs.logbrew.co/reference/cli.md).

```bash theme={null}
curl "https://api.logbrew.co/api/account/usage" \
  -H "Authorization: Bearer $LOGBREW_ACCOUNT_BEARER"
```

Example response with synthetic values. This free account has 1 project and
sent only logs in the current period:

```json theme={null}
{
  "period_start": "2026-06-01T00:00:00Z",
  "period_end": "2026-07-01T00:00:00Z",
  "reset_at": "2026-07-01T00:00:00Z",
  "plan": { "tier": "free", "status": "free" },
  "limits": { "events": null, "bytes": null, "projects": null, "retention_days": 30 },
  "usage": { "events": 27000, "bytes": 10485760, "projects": 1 },
  "state": "ok",
  "warning_threshold": 0.8,
  "percent_used": 0.02,
  "warning": false,
  "blocked": false,
  "limit": null,
  "next": "continue sending telemetry",
  "next_action": {
    "code": "continue_sending_telemetry",
    "target": "telemetry_ingest",
    "state": "ok",
    "limit": null,
    "reset_at": "2026-07-01T00:00:00Z"
  },
  "by_project": [
    { "project_id": "00000000-0000-4000-8000-000000000001", "events": 27000, "bytes": 10485760 }
  ],
  "by_stream": [
    { "kind": "logs", "events": 27000, "bytes": 10485760 }
  ]
}
```

| Field | Meaning |
| - | - |
| `period_start`, `period_end` | The current usage period. The end is exclusive. |
| `reset_at` | When the usage allowance resets. It is the same as `period_end`. |
| `plan.tier` | Plan identifier: `free`, `pro`, or `scale`. |
| `plan.status` | `free`, `trial`, `active`, `past_due`, or `disabled`. |
| `limits.events`, `limits.bytes`, `limits.projects` | Compatibility fields. They are `null`. `null` does not mean unlimited. Use `state`, `limit`, and `percent_used` for quota state. |
| `limits.retention_days` | The account's data retention, in days. It is the larger of the plan and an active new-account offer. It is `null` for an Enterprise plan, whose contract sets the retention. See [Data retention](#data-retention). |
| `usage.events`, `usage.bytes` | Totals for all telemetry streams in the period. |
| `usage.projects` | The number of projects that the account owns. |
| `state` | `ok`, `warning`, or `blocked`. |
| `warning_threshold` | The share of an allowance that starts the `warning` state, as a fraction. |
| `percent_used` | The highest share of any allowance, as a percentage. For example, `80` means 80%. |
| `warning`, `blocked` | Compatibility forms of `state`. |
| `limit` | The allowance that caused the state: `events`, `bytes`, or `null`. |
| `next`, `next_action` | Recovery text and the typed action for the current state. |
| `by_project` | Usage per project. There is 1 row for each owned project, also when its usage is zero. Match rows by `project_id`, not by array position. |
| `by_stream` | Usage per telemetry stream `kind`, such as `logs`, `issues`, `actions`, or `traces`. |

### 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.

```bash theme={null}
curl "https://api.logbrew.co/api/account/usage?response_version=2" \
  -H "Authorization: Bearer $LOGBREW_ACCOUNT_BEARER"
```

`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:

```json theme={null}
{
  "sdk_dropped_events": [
    { "project_id": "00000000-0000-4000-8000-000000000001", "reason": "queue_overflow", "events": 12 }
  ]
}
```

| Field | Meaning |
| - | - |
| `project_id` | The project whose SDK dropped the events. |
| `reason` | The reason code that the SDK sent, such as `queue_overflow`. |
| `events` | The number of dropped events. |

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](https://docs.logbrew.co/guides/opentelemetry.md).

### 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`.

```bash theme={null}
curl "https://api.logbrew.co/api/account/usage?response_version=3" \
  -H "Authorization: Bearer $LOGBREW_ACCOUNT_BEARER"
```

`offer` is `null` when no offer is active. Otherwise it has these fields:

```json theme={null}
{
  "offer": {
    "kind": "public_beta",
    "tier": "team",
    "starts_at": "2026-10-22T00:00:00Z",
    "ends_at": "2027-04-22T00:00:00Z"
  }
}
```

| Field | Meaning |
| - | - |
| `kind` | Why the allowances apply. The value is `public_beta`. |
| `tier` | The plan whose allowances apply. `team` is the Pro plan. |
| `starts_at`, `ends_at` | The offer period. The end is exclusive. |

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`.

| `state` | `warning` | `blocked` | `limit` | `next_action.code` | `next_action.target` |
| - | - | - | - | - | - |
| `ok` | `false` | `false` | `null` | `continue_sending_telemetry` | `telemetry_ingest` |
| `warning` | `true` | `false` | `events` or `bytes` | `reduce_usage_or_upgrade` | `pricing` |
| `blocked` | `false` | `true` | `events` or `bytes` | `wait_until_reset_or_upgrade` | `pricing` |

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](https://docs.logbrew.co/reference/api-errors.md#retry-rules).

The response is a snapshot. Read it again after an account change.

> [!NOTE]
>
> `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.

```bash theme={null}
curl --get "https://api.logbrew.co/api/account/usage/history" \
  -H "Authorization: Bearer $LOGBREW_ACCOUNT_BEARER" \
  --data-urlencode "interval=daily"
```

| `interval` | Buckets | Bucket start |
| - | -: | - |
| `daily` | 30 | 00:00 UTC |
| `weekly` | 12 | Monday, 00:00 UTC |
| `monthly` | 12 | First day of the month, 00:00 UTC |
| `yearly` | 5 | January 1, 00:00 UTC |

| Field | Meaning |
| - | - |
| `interval` | The requested interval. |
| `period_start`, `period_end` | The start and the exclusive end of the history window. |
| `current` | The complete `GET /api/account/usage` response for the current period, in version 3. It always has `sdk_dropped_events` and `offer`. |
| `buckets` | Buckets in time order, oldest first. Each bucket has `period_start`, `period_end`, `usage`, `by_project`, and `by_stream`. |

This `yearly` response uses synthetic data for a request in June 2026. All
usage occurred in June:

```json theme={null}
{
  "interval": "yearly",
  "period_start": "2022-01-01T00:00:00Z",
  "period_end": "2027-01-01T00:00:00Z",
  "current": {
    "period_start": "2026-06-01T00:00:00Z",
    "period_end": "2026-07-01T00:00:00Z",
    "reset_at": "2026-07-01T00:00:00Z",
    "plan": { "tier": "free", "status": "free" },
    "limits": { "events": null, "bytes": null, "projects": null, "retention_days": 30 },
    "usage": { "events": 27000, "bytes": 10485760, "projects": 1 },
    "state": "ok",
    "warning_threshold": 0.8,
    "percent_used": 0.02,
    "warning": false,
    "blocked": false,
    "limit": null,
    "next": "continue sending telemetry",
    "next_action": {
      "code": "continue_sending_telemetry",
      "target": "telemetry_ingest",
      "state": "ok",
      "limit": null,
      "reset_at": "2026-07-01T00:00:00Z"
    },
    "by_project": [
      { "project_id": "00000000-0000-4000-8000-000000000001", "events": 27000, "bytes": 10485760 }
    ],
    "by_stream": [{ "kind": "logs", "events": 27000, "bytes": 10485760 }],
    "sdk_dropped_events": [],
    "offer": null
  },
  "buckets": [
    { "period_start": "2022-01-01T00:00:00Z", "period_end": "2023-01-01T00:00:00Z", "usage": { "events": 0, "bytes": 0, "projects": 0 }, "by_project": [], "by_stream": [] },
    { "period_start": "2023-01-01T00:00:00Z", "period_end": "2024-01-01T00:00:00Z", "usage": { "events": 0, "bytes": 0, "projects": 0 }, "by_project": [], "by_stream": [] },
    { "period_start": "2024-01-01T00:00:00Z", "period_end": "2025-01-01T00:00:00Z", "usage": { "events": 0, "bytes": 0, "projects": 0 }, "by_project": [], "by_stream": [] },
    { "period_start": "2025-01-01T00:00:00Z", "period_end": "2026-01-01T00:00:00Z", "usage": { "events": 0, "bytes": 0, "projects": 0 }, "by_project": [], "by_stream": [] },
    {
      "period_start": "2026-01-01T00:00:00Z",
      "period_end": "2027-01-01T00:00:00Z",
      "usage": { "events": 27000, "bytes": 10485760, "projects": 1 },
      "by_project": [
        { "project_id": "00000000-0000-4000-8000-000000000001", "events": 27000, "bytes": 10485760 }
      ],
      "by_stream": [{ "kind": "logs", "events": 27000, "bytes": 10485760 }]
    }
  ]
}
```

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`:

```json theme={null}
{
  "error": "Unsupported usage history interval",
  "code": "validation_failed",
  "next": "use interval=daily, weekly, monthly, or yearly",
  "next_action": {
    "code": "fix_request",
    "target": "request"
  }
}
```

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](#new-account-offer) gets the Pro
allowances free until the offer ends.

| Plan | `tier` | Price per month | Logs | Metrics | Spans | Issue events | Retention |
| - | - | - | - | - | - | - | - |
| Free | `developer` | \$0 | 50 GB | 50 GB | 50 million | 100,000 | 30 days |
| Pro | `team` | \$25 | 500 GB | 500 GB | 500 million | 2 million | 90 days |
| Business | `business` | \$80 | 2,000 GB | 2,000 GB | 2 billion | 10 million | 365 days |
| Enterprise | `enterprise` | Quote | Custom | Custom | Custom | Custom | Custom |

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`.

```bash theme={null}
curl "https://api.logbrew.co/api/billing/catalog"
```

The response lists the plans in this order. This example shows the Pro plan:

```json theme={null}
{
  "response_version": 1,
  "currency": "usd",
  "interval": "month",
  "checkout_available": true,
  "plans": [
    {
      "tier": "team",
      "monthly_price_cents": 2500,
      "activation": "checkout",
      "quote_email": null,
      "limits": {
        "issue_events": 2000000,
        "log_bytes": 500000000000,
        "metric_bytes": 500000000000,
        "trace_spans": 500000000,
        "retention_days": 90,
        "unlimited_projects": true
      }
    }
  ]
}
```

| Field | Meaning |
| - | - |
| `checkout_available` | `true` when you can buy a paid plan. It is `false` when checkout is unavailable. |
| `monthly_price_cents` | The price in US cents. It is `null` for a quoted plan. |
| `activation` | `included`, `checkout`, or `quote`. |
| `quote_email` | The email address that you write to for a quote. It is `null` for the other plans. |
| `limits` | The allowances for 1 billing month. A value of `null` is set by contract. |

### 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.

```bash theme={null}
curl "https://api.logbrew.co/api/account/subscription" \
  -H "Authorization: Bearer $LOGBREW_ACCOUNT_BEARER"
```

A free account returns this response. The `account_id` is synthetic:

```json theme={null}
{
  "account_id": "00000000-0000-4000-8000-0000000000aa",
  "tier": "free",
  "billing_interval": "none",
  "state": "free",
  "access_state": "active",
  "current_period_start": null,
  "current_period_end": null,
  "renews_at": null,
  "cancels_at": null,
  "organization_creation_allowed": true,
  "organization_creation_blocker": null,
  "limits": {
    "organizations": 1,
    "members_per_organization": 9007199254740991,
    "projects_per_organization": 9007199254740991,
    "invitations_per_day": 20
  },
  "next": "<display text>",
  "next_action": {
    "code": "create_or_manage_organization",
    "target": "organization"
  }
}
```

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:

| Field | Values |
| - | - |
| `tier` | `free`, `pro`, `scale` |
| `billing_interval` | `none`, `monthly`, `yearly` |
| `state` | `free`, `trialing`, `active`, `past_due`, `paused`, `canceled` |
| `access_state` | `active` for `free`, `trialing`, and `active`. `paused` for `past_due`, `paused`, and `canceled`. |
| `organization_creation_blocker` | `organization_limit_exceeded` or `null` |

The API does not return the blockers `subscription_required` and
`subscription_inactive`. Each blocker has one `next_action` pair:

| `organization_creation_blocker` | `next_action.code` | `next_action.target` |
| - | - | - |
| `null` | `create_or_manage_organization` | `organization` |
| `organization_limit_exceeded` | `manage_organization_limit` | `organization` |

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:

```bash theme={null}
curl "https://api.logbrew.co/api/account/invitations" \
  -H "Authorization: Bearer $LOGBREW_ACCOUNT_BEARER"
```

The response lists pending invitations that did not expire, newest first, up
to 100. The IDs are synthetic:

```json theme={null}
{
  "invitations": [
    {
      "id": "00000000-0000-4000-8000-0000000000c1",
      "organization_id": "00000000-0000-4000-8000-0000000000b1",
      "organization_name": "Example Org",
      "role": "member",
      "state": "pending",
      "created_at": "2026-10-22T12:00:00Z",
      "expires_at": "2026-10-29T12:00:00Z",
      "inviter_name": "Example Owner",
      "accept_path": "/api/organizations/00000000-0000-4000-8000-0000000000b1/invitations/00000000-0000-4000-8000-0000000000c1/accept"
    }
  ]
}
```

Read one invitation from its link:

```bash theme={null}
curl "https://api.logbrew.co/api/organizations/$ORGANIZATION_ID/invitations/$INVITATION_ID" \
  -H "Authorization: Bearer $LOGBREW_ACCOUNT_BEARER"
```

The response is one invitation with the same fields.

| Field | Meaning |
| - | - |
| `organization_name` | The name of the organization that invited you. |
| `role` | The role you get when you accept: `admin` or `member`. |
| `state` | `pending`, `accepted`, `expired`, or `revoked`. A pending invitation after `expires_at` is `expired`. |
| `inviter_name` | The display name of the account that sent the invitation, or `null`. |
| `accept_path` | Send `POST` to this path to accept the invitation. |

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](https://docs.logbrew.co/reference/api-errors.md#limit-fields).

## 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.

| Scope | Endpoint | Credential |
| - | - | - |
| One app or CLI login | `POST /api/auth/logout` | That client's refresh token in the JSON body. No bearer. |
| Every LogBrew login | `POST /api/auth/logout-all` | Account bearer or browser session. No body. |
| The current browser session | `POST /api/auth/web/logout` | None. The response clears the browser cookie. |

### One app or CLI login

Send the request from the client that holds the refresh token. Set
`Content-Type: application/json`:

```json theme={null}
{
  "refresh_token": "<current refresh token>"
}
```

Never ask a person or agent to print or paste a refresh token. A successful
response is `200`:

```json theme={null}
{
  "revoked": true,
  "next_action": {
    "code": "clear_local_session",
    "target": "local_credentials"
  }
}
```

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](#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

> [!WARNING]
>
> 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`:

```json theme={null}
{
  "revoked": true,
  "revoked_before": "2026-09-07T12:00:00.123Z",
  "next_action": {
    "code": "clear_local_session",
    "target": "local_credentials"
  }
}
```

`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](https://docs.logbrew.co/guides/troubleshooting.md#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](#every-logbrew-login).

### Recover from a sign-out error

| Result | Recovery |
| - | - |
| `401` from `POST /api/auth/logout` | Remove the client's local credentials. Do not send another credential type. |
| `401` from `POST /api/auth/logout-all` | Sign in from a trusted client if the user still wants access. Get approval again before you repeat the request. |
| `405` | Use the method that `next` names, and only for the scope that the user approved. |
| `invalid_json` from `POST /api/auth/logout` | Send a JSON object with a string `refresh_token` and `Content-Type: application/json`. Do not print the token. |
| A timeout or a `5xx` status | Do not report success. Do not start an automatic sign-in and sign-out loop. Follow the [write retry rules](https://docs.logbrew.co/reference/api-errors.md#writes). |

For telemetry routes, filters, and pagination, read the
[Telemetry API](https://docs.logbrew.co/reference/telemetry-api.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.