---
title: "Update Quota Override"
method: PATCH
path: "/api/messages/admin/cost-management/quota/{plan}/{operation}"
tags: ["Cost Management (Admin)"]
---

# Update Quota Override

`PATCH /api/messages/admin/cost-management/quota/{plan}/{operation}`

## Request

- Base URL: `https://api.soeru.biz` (the document declares no server; this is the origin it was published from)
- URL: `https://api.soeru.biz/api/messages/admin/cost-management/quota/{plan}/{operation}`
- Auth: none declared. Required headers: `authorization`

plan × operation の月間 cap を DB override で上書き.

flow:
  1. validate (plan / operation / monthly_cap range / 巨大値 confirm)
  2. 旧値を取得 (audit log の old_cap 用)
  3. quota_overrides を UPSERT
  4. quota_override_log に audit 行を INSERT
  5. invalidate_cap_cache() で自 process の cache をパージ
     (他 instance は最大 60s 遅延で自然反映)

## Path parameters

- `plan` string, required
- `operation` string, required

## Headers

- `authorization` string, required: Bearer <token>

## Request body

- CapPatchRequest: PATCH /quota/{plan}/{operation} body.
  - `monthly_cap` integer, required
  - `reason` string, nullable
  - `confirm_large_value` boolean

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/soeru/apis/soeru-api.md) · [All operations](https://skmtc.dev/soeru/apis/soeru-api/llms.txt) · [OpenAPI document](https://skmtc.dev/soeru/apis/soeru-api/revisions/63f8d371abed?raw)
