# limits (operator)

Per-customer limits (per transaction, daily, monthly, velocity) with tolerance bands, and the limit exception queue.

## GET /customers/{customerId}/limits

operationId: `getCustomerLimits`
Summary: Customer limits and usage
API key scopes: `account:read`, `customers:manage`
Callable by: customer and operator keys
Parameters: `customerId` (path, required), `X-Tenant-Id` (header, required), `X-Request-Id` (header), `If-None-Match` (header)
Responses: 200 `CustomerLimits`, 304, 401 `Problem`, 403 `Problem`, 404 `Problem`, 429 `Problem`, default `Problem`

**API key scopes:** `account:read` or `customers:manage` (customer-level keys (`X-Tenant-Id` = the key's customer) and operator-level keys (`X-Tenant-Id` = the operator id), each with a scope of its own level).

## PUT /customers/{customerId}/limits

operationId: `replaceCustomerLimits`
Summary: Set customer limits
API key scopes: `customers:manage`
Callable by: operator keys
Parameters: `customerId` (path, required), `X-Tenant-Id` (header, required), `X-Request-Id` (header), `If-Match` (header, required)
Responses: 200 `CustomerLimits`, 400 `Problem`, 401 `Problem`, 403 `Problem`, 404 `Problem`, 409 `Problem`, 412 `Problem`, 422 `Problem`, 428 `Problem`, 429 `Problem`, default `Problem`

`effectiveFrom` (default now, not in the past) schedules the change.

**Concurrency:** `If-Match` with the current `ETag` is required (`428` if absent, `412` if stale).

**API key scopes:** `customers:manage` (operator-level keys only (`X-Tenant-Id` = the operator id)).

**Step-up and API keys (P15-T01):** API keys holding the scope call it without a step-up; every change made with a key is emailed to every operator owner (`control_changed_by_api_key`, locked category: what changed, the key name and prefix, a link to the screen) and audited with the key id. The route's validation applies to keys exactly as to sessions.

## GET /ops/limits

operationId: `getOperatorLimits`
Summary: Operator default limits
API key scopes: `operator:read`
Callable by: operator keys
Parameters: `X-Tenant-Id` (header, required), `X-Request-Id` (header), `If-None-Match` (header)
Responses: 200 `OperatorLimits`, 304, 401 `Problem`, 403 `Problem`, 429 `Problem`, default `Problem`

Replaces the retired `OperatorSettings.defaultLimits`.

**API key scopes:** `operator:read` (operator-level keys only (`X-Tenant-Id` = the operator id)).

## PUT /ops/limits

operationId: `replaceOperatorLimits`
Summary: Set operator default limits
API key scopes: `operator:write`
Callable by: operator keys
Parameters: `X-Tenant-Id` (header, required), `X-Request-Id` (header), `If-Match` (header, required)
Request body: `OperatorLimitsWrite`
Responses: 200 `OperatorLimits`, 400 `Problem`, 401 `Problem`, 403 `Problem`, 409 `Problem`, 412 `Problem`, 422 `Problem`, 428 `Problem`, 429 `Problem`, default `Problem`

**Concurrency:** `If-Match` with the current `ETag` is required (`428` if absent, `412` if stale).

**API key scopes:** `operator:write` (operator-level keys only (`X-Tenant-Id` = the operator id)).

**Step-up and API keys (P15-T01):** API keys holding the scope call it without a step-up; every change made with a key is emailed to every operator owner (`control_changed_by_api_key`, locked category: what changed, the key name and prefix, a link to the screen) and audited with the key id. The route's validation applies to keys exactly as to sessions.

## GET /ops/monitoring-alerts

operationId: `listMonitoringAlerts`
Summary: Monitoring alert queue
API key scopes: `compliance:read`
Callable by: operator keys
Parameters: `X-Tenant-Id` (header, required), `X-Request-Id` (header), `cursor` (query), `limit` (query), `sort` (query), `filter` (query), `withTotal` (query)
Responses: 200 `MonitoringAlertPage`, 400 `Problem`, 401 `Problem`, 403 `Problem`, 429 `Problem`, default `Problem`

**API key scopes:** `compliance:read` (operator-level keys only (`X-Tenant-Id` = the operator id)).

## GET /ops/monitoring-alerts/{alertId}

operationId: `getMonitoringAlert`
Summary: Get monitoring alert
API key scopes: `compliance:read`
Callable by: operator keys
Parameters: `alertId` (path, required), `X-Tenant-Id` (header, required), `X-Request-Id` (header)
Responses: 200 `MonitoringAlert`, 401 `Problem`, 403 `Problem`, 404 `Problem`, 429 `Problem`, default `Problem`

**API key scopes:** `compliance:read` (operator-level keys only (`X-Tenant-Id` = the operator id)).

## GET /ops/monitoring-rules

operationId: `listMonitoringRules`
Summary: Transaction monitoring rules
API key scopes: `operator:read`
Callable by: operator keys
Parameters: `X-Tenant-Id` (header, required), `X-Request-Id` (header)
Responses: 200, 401 `Problem`, 403 `Problem`, 429 `Problem`, default `Problem`

**API key scopes:** `operator:read` (operator-level keys only (`X-Tenant-Id` = the operator id)).
