> ## 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.

# POST /admin/api/mcp-scopes/batch



## OpenAPI

````yaml /generated/openapi.json post /admin/api/mcp-scopes/batch
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.3.0
servers: []
security:
  - bearer: []
  - anthropicKey: []
  - googleKey: []
  - queryKey: []
paths:
  /admin/api/mcp-scopes/batch:
    post:
      tags:
        - Management
      summary: POST /admin/api/mcp-scopes/batch
      parameters:
        - description: Administrative scope selected by the caller.
          in: header
          name: x-gproxy-admin-scope
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/Input_BatchItem6'
              type: array
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  anyOf:
                    - $ref: '#/components/schemas/Output_McpScopeDto'
                    - type: 'null'
                type: array
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_Envelope'
          description: Gateway error
      security:
        - consoleSession: []
        - bearer: []
        - anthropicKey: []
        - googleKey: []
components:
  schemas:
    Input_BatchItem6:
      description: |-
        One step of a batch write. Every item of one batch lands in a single
        revision commit: either all of them are durable or none is.
      oneOf:
        - additionalProperties: false
          properties:
            create:
              $ref: '#/components/schemas/Input_McpScopeWrite'
          required:
            - create
          type: object
        - additionalProperties: false
          properties:
            update:
              $ref: '#/components/schemas/Input_BatchPatch6'
          required:
            - update
          type: object
        - additionalProperties: false
          properties:
            delete:
              type: string
          required:
            - delete
          type: object
    Output_McpScopeDto:
      properties:
        action:
          description: '`allow` or `deny`.'
          type: string
        apiKeyId:
          type:
            - string
            - 'null'
        id:
          type: string
        priority:
          description: Higher wins; at one priority a refusal wins.
          format: int32
          type: integer
        scope:
          description: |-
            `mcp:<server>:<tool>`; either part may be `*`, the tool part may be
            `@read`, `@write` or `@destructive`, and `mcp:*` is everything.
          type: string
        userId:
          description: 'The rule''s subject: exactly one of the two is set.'
          type:
            - string
            - 'null'
      required:
        - id
        - userId
        - apiKeyId
        - scope
        - action
        - priority
      type: object
    Output_Envelope:
      properties:
        error:
          $ref: '#/components/schemas/Output_EnvelopeBody'
      required:
        - error
      type: object
    Input_McpScopeWrite:
      properties:
        action:
          type: string
        apiKeyId:
          default: null
          type:
            - string
            - 'null'
        id:
          default: null
          type:
            - string
            - 'null'
        priority:
          default: null
          format: int32
          type:
            - integer
            - 'null'
        scope:
          type: string
        userId:
          default: null
          type:
            - string
            - 'null'
      required:
        - scope
        - action
      type: object
    Input_BatchPatch6:
      properties:
        id:
          type: string
        patch:
          $ref: '#/components/schemas/Input_McpScopePatch'
      required:
        - id
        - patch
      type: object
    Output_EnvelopeBody:
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
    Input_McpScopePatch:
      description: >-
        The subject of a rule does not change; delete the rule and write
        another.
      properties:
        action:
          default: null
          type:
            - string
            - 'null'
        priority:
          default: null
          format: int32
          type:
            - integer
            - 'null'
        scope:
          default: null
          type:
            - string
            - 'null'
      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/mcp-tool-natures/batch](https://gproxy.leenhawk.com/api-reference/management/post-adminapimcp-tool-naturesbatch.md)
- [POST /admin/api/mcp-scopes](https://gproxy.leenhawk.com/api-reference/management/post-adminapimcp-scopes.md)
- [POST /admin/api/mcp-tool-natures](https://gproxy.leenhawk.com/api-reference/management/post-adminapimcp-tool-natures.md)
- [POST /admin/api/organizations/batch](https://gproxy.leenhawk.com/api-reference/management/post-adminapiorganizationsbatch.md)
- [POST /admin/api/teams/batch](https://gproxy.leenhawk.com/api-reference/management/post-adminapiteamsbatch.md)


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