---
title: "Replace the quota template of a tier (admin)"
method: PUT
path: "/admin/tiers/{code}/quotas"
tags: ["admin"]
---

# Replace the quota template of a tier (admin)

`PUT /admin/tiers/{code}/quotas`

## Request

- Base URL: `https://api.qualityclouds.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.qualityclouds.ai/admin/tiers/{code}/quotas`
- Auth: one of:
  - HTTP bearer
  - OpenID Connect (`https://account.qualityclouds.com//realms/ai-production/.well-known/openid-configuration`)

Replaces the whole quota set: a key that is absent from the body is removed from the tier. The organisations already on the tier keep their current quotas; the template applies on their next tier change. Requires the Keycloak 'admins' group.

## Path parameters

- `code` string, required

## Request body

- AdminTierQuotasRequest: PUT /admin/tiers/{code}/quotas — replace the whole quota template. A replace, not a merge: a quota template is a complete statement of what the tier grants, so sending a key set without one key removes it.
  - `quotas` AdminTierQuotaItem[], required
    - `quota_key` string, required: One of the keys the licensing code reads: max_autofixes_per_month, max_connections, max_repositories, max_scans_per_month, max_scans_per_week, max_users, max_workspaces.
    - `max_allowed` integer, required: The limit. 0 means nothing is allowed.
    - `reset_period` string, nullable: 'weekly' or 'monthly' for a rolling pool, null for a standing limit. It must match the period the key requires.

## Response `200`

Successful Response

- AdminTierQuotaResponse[]
  - `quota_key` string, required
  - `max_allowed` integer, required
  - `reset_period` string, nullable, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `422`: Validation Error

---

[API](https://skmtc.dev/qualityclouds/apis/qai-orchestrator-api.md) · [All operations](https://skmtc.dev/qualityclouds/apis/qai-orchestrator-api/llms.txt) · [OpenAPI document](https://skmtc.dev/qualityclouds/apis/qai-orchestrator-api/revisions/250c849925af?raw)
