ScopeEnforcement
A request or response body; the type column links to the schemas it refers to.
ScopeEnforcement
| Field | Type | Required | Description |
|---|---|---|---|
| mode | string | yes | What a token missing a scope an endpoint requires gets now: `enforce` refuses it `403 insufficient_scope`; `report` lets the request through and records it. `agent-sessions:archive` and `agent-sessions:delete` are refused either way. one of "report" | "enforce" |
| configured_mode | string | yes | The mode a superuser set (or the migration seeded). one of "report" | "enforce" |
| environment_override | string | null | yes | The mode the `API_SCOPE_ENFORCEMENT` environment variable pins, overriding the setting; null when it is unset. one of "report" | "enforce" | null |
| updated_at | string (date-time) | null | yes | — |
| readout | object | yes | — |
jsonExample
{
"mode": "report",
"configured_mode": "report",
"environment_override": "report",
"updated_at": "2026-01-01T00:00:00.000Z",
"readout": {
"days": 7,
"requests": 0,
"refused": 0,
"accounts": 0,
"clients": [
{
"provider_id": "1b671a64-40d5-491e-99b0-da01ff1f3341",
"provider_name": "Botree Auth",
"client_id": "lrs-design-agent",
"kind": "browser",
"accounts": 0,
"account_examples": [
{
"id": "1b671a64-40d5-491e-99b0-da01ff1f3341",
"name": "string"
}
],
"requests": 0,
"refused": 0,
"missing_scopes": [
"account:read",
"records:write"
],
"last_seen_at": "2026-01-01T00:00:00.000Z"
}
]
}
}