> ## Documentation Index
> Fetch the complete documentation index at: https://gproxy.leenhawk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PATCH /admin/api/quotas/{id}



## OpenAPI

````yaml /generated/openapi.json patch /admin/api/quotas/{id}
openapi: 3.1.0
info:
  description: >-
    Forwarding, management, portal and OAuth APIs generated from Rust types.
    Input and output schemas preserve their respective Serde contracts.
    Streaming events and WebSocket messages are documented alongside HTTP
    payloads.
  title: GPROXY HTTP API
  version: 4.2.1
servers: []
security:
  - bearer: []
  - anthropicKey: []
  - googleKey: []
  - queryKey: []
paths:
  /admin/api/quotas/{id}:
    patch:
      tags:
        - Management
      summary: PATCH /admin/api/quotas/{id}
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - description: Administrative scope selected by the caller.
          in: header
          name: x-gproxy-admin-scope
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Input_QuotaPatch'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_QuotaDto'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_Envelope'
          description: Gateway error
      security:
        - consoleSession: []
        - bearer: []
        - anthropicKey: []
        - googleKey: []
components:
  schemas:
    Input_QuotaPatch:
      properties:
        anchorAtMs:
          default: null
          format: int64
          type:
            - integer
            - 'null'
        enabled:
          default: null
          type:
            - boolean
            - 'null'
        limitValue:
          default: null
          type:
            - string
            - 'null'
        metric:
          default: null
          type:
            - string
            - 'null'
        modelPattern:
          default: null
          type:
            - string
            - 'null'
        ownerId:
          default: null
          type:
            - string
            - 'null'
        ownerKind:
          default: null
          type:
            - string
            - 'null'
        period:
          default: null
          type:
            - string
            - 'null'
        periodSeconds:
          default: null
          format: int64
          type:
            - integer
            - 'null'
        unit:
          default: null
          type:
            - string
            - 'null'
        windowKey:
          default: null
          type:
            - string
            - 'null'
      type: object
    Output_QuotaDto:
      description: >-
        One configured budget or operator limit. `owner_kind` is a free string:

        `user`, `api_key`, `team`, `org` and `pool` are caller budgets the host

        names per request, while `credential` and `provider` are operator limits
        on

        upstream accounts. Both live in one table because both are windows over
        a

        metric.
      properties:
        anchorAtMs:
          format: int64
          type:
            - integer
            - 'null'
        enabled:
          type: boolean
        id:
          type: string
        limitValue:
          type: string
        metric:
          description: '`cost` for a budget; `requests` or `cost` for a limit.'
          type: string
        modelPattern:
          description: >-
            A `*`/`?` glob over the upstream model name; absent covers
            everything.
          type:
            - string
            - 'null'
        ownerId:
          type: string
        ownerKind:
          type: string
        period:
          description: '`5h`, `1d`, `7d`, `1m`, `total`, or anything with `period_seconds`.'
          type: string
        periodSeconds:
          format: int64
          type:
            - integer
            - 'null'
        unit:
          description: '`USD` for cost, `count` for requests.'
          type: string
        windowKey:
          description: Stable key within the owner, e.g. `primary`.
          type: string
      required:
        - id
        - ownerKind
        - ownerId
        - windowKey
        - metric
        - unit
        - limitValue
        - period
        - periodSeconds
        - anchorAtMs
        - modelPattern
        - enabled
      type: object
    Output_Envelope:
      properties:
        error:
          $ref: '#/components/schemas/Output_EnvelopeBody'
      required:
        - error
      type: object
    Output_EnvelopeBody:
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
  securitySchemes:
    bearer:
      scheme: bearer
      type: http
    anthropicKey:
      in: header
      name: x-api-key
      type: apiKey
    googleKey:
      in: header
      name: x-goog-api-key
      type: apiKey
    queryKey:
      in: query
      name: key
      type: apiKey
    consoleSession:
      in: cookie
      name: gproxy_session
      type: apiKey

````

## Related topics

- [POST /admin/api/quotas/batch](https://gproxy.leenhawk.com/api-reference/management/post-adminapiquotasbatch.md)
- [DELETE /admin/api/quotas/{id}](https://gproxy.leenhawk.com/api-reference/management/delete-adminapiquotas.md)
- [GET /admin/api/quotas/{id}](https://gproxy.leenhawk.com/api-reference/management/get-adminapiquotas-1.md)
- [POST /admin/api/quotas/{id}/reset](https://gproxy.leenhawk.com/api-reference/management/post-adminapiquotas-reset.md)
- [GET /admin/api/quotas](https://gproxy.leenhawk.com/api-reference/management/get-adminapiquotas.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.