Usage Metering

Update a usage quota

Updates the supplied fields on a usage quota and leaves omitted fields unchanged. For an organization-wide quota, pending_usage_limit schedules a limit for the next usage period. The quota must belong to the caller's organization or one of its descendants, and its opaque identifier must belong to the requested quota namespace. Requires the billing_edit permission.

patch/api/v2/usage/quotas/{quota_namespace}/{id}

Request

Path parameters

quota_namespacestring required
Example:ai_credits

The product-specific namespace whose usage quotas are being managed.

idstring required
Example:MTIzNB9haV9jcmVkaXRzH3VzZXJfaGFuZGxlOl9fQUxMX18

The opaque quota identifier returned by a previous list or create request. Clients must pass this value verbatim.

Request body

Example request

{
  "data": {
    "attributes": {
      "pending_usage_limit": 50000,
      "usage_limit": 120000
    },
    "id": "MTIzNB9haV9jcmVkaXRzH3VzZXJfaGFuZGxlOl9fQUxMX18",
    "type": "quotas"
  }
}

Response

OK

Example response

{
  "data": {
    "attributes": {
      "enforced": true,
      "org_public_id": "abcdef12345",
      "pending_effective_from": "2026-11",
      "pending_usage_limit": 50000,
      "scope": {
        "user_handle": "jane@example.com"
      },
      "usage_limit": 100000
    },
    "id": "MTIzNB9haV9jcmVkaXRzH3VzZXJfaGFuZGxlOl9fQUxMX18",
    "type": "quotas"
  }
}

Changes

Changes to this operation have not been checked yet.