---
title: "Set Payer Quota"
method: PUT
path: "/admin/payers/{user_id}/llm-quota"
tags: ["quotas"]
---

# Set Payer Quota

`PUT /admin/payers/{user_id}/llm-quota`

## Request

- Base URL: `https://app.zeno-works.ch` (the document declares no server; this is the origin it was published from)
- URL: `https://app.zeno-works.ch/admin/payers/{user_id}/llm-quota`
- Auth: none declared

Change a billing user's onboarding allowance, extra-tokens switch or company cap.

Every field is optional, so changing one never silently rewrites the others. The
balances themselves are not writable — a goodwill top-up is an `admin_grant` purchase.

**Quota-held work is released** when the edit leaves the payer funded, in its own
transaction after the account row's lock is gone — so the file scan never holds up a
concurrent charge. An edit that funds nothing releases nothing.

## Path parameters

- `user_id` string, required

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Request body

- PayerQuotaUpdate: An admin edit. Every field optional — a PATCH-shaped PUT, so changing one never silently rewrites the others. **Magnitudes are not writable.** `onboarding_consumed`, `monthly_used` and `unfunded_tokens` are written only by a charge; editing them would break the identity every account holds against its `token_charge` rows. A goodwill top-up is an `admin_grant` purchase (`POST /admin/payers/{id}/token-purchases`). **`extra="forbid"`, unlike the rest of `ApiModel`.** A caller still sending a retired field (`monthly_limit`, `enforce`, `state`, `onboarding_closes_at`) gets a 422 rather than 200 OK with nothing written and the unchanged value echoed back — an operator following an old runbook would otherwise see success and a payer who stayed stuck.
  - `onboarding_allowance` integer, nullable
  - `use_extra_tokens` boolean, nullable
  - `max_companies` integer, nullable

## Response `200`

Successful Response

- PayerQuotaOut: The admin view of one billing user's three budgets. **Addressed by payer, and it says how many companies that is** — raising a figure here raises it for all of them.
  - `payer_user_id` string, required
  - `payer_email` string, required
  - `company_count` integer, required
  - `onboarding_allowance` integer, required
  - `onboarding_consumed` integer, required
  - `onboarding_left` integer, required
  - `monthly_limit` integer, required
  - `monthly_used` integer, required
  - `monthly_left` integer, required
  - `resets_at` string, date-time, nullable
  - `extra_left` integer, required
  - `use_extra_tokens` boolean, required
  - `unfunded_tokens` integer, required
  - `available` integer, required
  - `at_limit` boolean, required
  - `max_companies` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zeno-works/apis/zeno-api.md) · [All operations](https://skmtc.dev/zeno-works/apis/zeno-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zeno-works/apis/zeno-api/revisions/1eb93dde146c?raw)
