Create a quota policy. POST /api/openapi/v1/quota-policies, scope admin.v1.quota.manage.
- Scope: admin.v1.quota.manage
- Permission: Manage quotas and metering (quota)
- Permission type: Manage
- Endpoint: POST/api/openapi/v1/quota-policies
Authentication and request headers
Call with an application API key. This endpoint checks only the scope above; read, manage and execute permissions do not imply one another.
| Name | Location | Type | Required | Description | Example |
|---|---|---|---|---|---|
| Authorization | header | string | Yes | Application API key, passed as a Bearer token. | Bearer qwk_*** |
| X-Request-Id | header | string | No | Optional request tracing identifier; generated by the server if omitted. | req-20260831-001 |
Request parameters
| Name | Location | Type | Required | Description | Example |
|---|---|---|---|---|---|
| description | body | string | No | Description | "<string>" |
| name | body | string | Required | Policy name | "<string>" |
| per_user_limit | body | integer · int64 | Required | Credit limit per user per cycle | 500 |
| priority | body | integer · int64 | Required | Priority | 0 |
| scopes | body | array | null | No | Applicable users | [{"id":"<string>","type":"user"}] |
Request example
cURL
Responses
201 Created
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| created_at | string · date-time | Yes | Created at | "2026-08-27T10:00:00Z" |
| description | string | No | Description | "<string>" |
| id | integer · int64 | Yes | Policy group ID | 0 |
| is_default | boolean | Yes | Whether this is the default policy group | false |
| name | string | Yes | Policy name | "<string>" |
| per_user_limit | integer · int64 | Yes | Per-user allowance in whole credits | 0 |
| priority | integer · int64 | Yes | Priority | 0 |
| scopes | array | null | Yes | Applicable users | [{"id":"<string>","type":"user"}] |
| status | string | Yes | Enabled | "enabled" |
| updated_at | string · date-time | Yes | Updated at | "2026-08-27T10:00:00Z" |
default Flat business error
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| code | string | No | Stable business error code | "<string>" |
| detail | string | Yes | Human-readable error description | "<string>" |
| details | OpenapiErrorDetails | No | Error details | {"field":"<string>","reason":"<string>","suggestion":"<string>"} |
| details.field | string | No | Request field that failed validation | "<string>" |
| details.reason | string | No | Stable validation failure reason | "<string>" |
| details.suggestion | string | No | Suggested normalized value | "<string>" |
| error | string | Yes | Stable HTTP error type | "<string>" |