> ## 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/permissions/{id}



## OpenAPI

````yaml /generated/openapi.json patch /admin/api/permissions/{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/permissions/{id}:
    patch:
      tags:
        - Management
      summary: PATCH /admin/api/permissions/{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_PermissionPatch'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_PermissionDto'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_Envelope'
          description: Gateway error
      security:
        - consoleSession: []
        - bearer: []
        - anthropicKey: []
        - googleKey: []
components:
  schemas:
    Input_PermissionPatch:
      properties:
        action:
          default: null
          type:
            - string
            - 'null'
        apiKeyId:
          default: null
          type:
            - string
            - 'null'
        modelPattern:
          default: null
          type:
            - string
            - 'null'
        operation:
          default: null
          type:
            - string
            - 'null'
        priority:
          default: null
          format: int32
          type:
            - integer
            - 'null'
        providerId:
          default: null
          type:
            - string
            - 'null'
        userId:
          default: null
          type:
            - string
            - 'null'
      type: object
    Output_PermissionDto:
      properties:
        action:
          description: '`allow` or `deny`.'
          type: string
        apiKeyId:
          type:
            - string
            - 'null'
        id:
          type: string
        modelPattern:
          description: |-
            A glob: `*` and `?`, anchored, case-sensitive. `*` matches a request
            that names no model at all.
          type: string
        operation:
          description: None means every operation.
          type:
            - string
            - 'null'
        priority:
          description: Higher wins; ties fall back to id order.
          format: int32
          type: integer
        providerId:
          description: None means every provider.
          type:
            - string
            - 'null'
        userId:
          description: >-
            Exactly one of these two is set. A rule with neither is a grant to

            nobody; a rule with both is an intersection the snapshot still
            honours

            but this family refuses to write, because nobody who wrote one meant

            "the key *and* the user".
          type:
            - string
            - 'null'
      required:
        - id
        - userId
        - apiKeyId
        - providerId
        - modelPattern
        - operation
        - action
        - priority
      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/permissions/batch](https://gproxy.leenhawk.com/api-reference/management/post-adminapipermissionsbatch.md)
- [DELETE /admin/api/permissions/{id}](https://gproxy.leenhawk.com/api-reference/management/delete-adminapipermissions.md)
- [GET /admin/api/permissions/{id}](https://gproxy.leenhawk.com/api-reference/management/get-adminapipermissions-1.md)
- [POST /admin/api/permissions](https://gproxy.leenhawk.com/api-reference/management/post-adminapipermissions.md)
- [GET /admin/api/permissions](https://gproxy.leenhawk.com/api-reference/management/get-adminapipermissions.md)


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