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

# Set member permission overrides

> Sets per-member permission overrides on top of the member's role. Both arrays are required; use `[]` for none. Sending two empty arrays clears the overrides. See [Roles and permissions](/reference/permissions) for what can be granted or revoked.

**Required permission:** `member:update`




## OpenAPI

````yaml /api-reference/openapi.yaml patch /api/v1/members/{userId}/permissions
openapi: 3.1.0
info:
  title: Igris Management API
  version: '1'
  description: >-
    REST API for managing Igris connections, policies, sessions, audit events
    and alerts.
servers:
  - url: https://api.igrisecurity.com
security:
  - bearerAuth: []
tags:
  - name: Connections
  - name: Policies
  - name: Sessions
  - name: Audit Events
  - name: Incidents
  - name: Webhooks
  - name: API Keys
  - name: Members
  - name: LLM Providers
  - name: LLM Cost
  - name: Observe
paths:
  /api/v1/members/{userId}/permissions:
    patch:
      tags:
        - Members
      summary: Set member permission overrides
      description: >
        Sets per-member permission overrides on top of the member's role. Both
        arrays are required; use `[]` for none. Sending two empty arrays clears
        the overrides. See [Roles and permissions](/reference/permissions) for
        what can be granted or revoked.


        **Required permission:** `member:update`
      operationId: setMemberPermissions
      parameters:
        - name: userId
          in: path
          required: true
          description: The member's user ID.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - grants
                - revokes
              properties:
                grants:
                  type: array
                  maxItems: 64
                  items:
                    type: string
                    maxLength: 64
                  description: Permissions to add to the role's defaults.
                revokes:
                  type: array
                  maxItems: 64
                  items:
                    type: string
                    maxLength: 64
                  description: Permissions to remove from the role's defaults.
            example:
              grants:
                - policies:write
              revokes:
                - sessions:write
      responses:
        '200':
          description: The stored overrides and the resulting permissions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      grants:
                        type: array
                        items:
                          type: string
                      revokes:
                        type: array
                        items:
                          type: string
                      permissions:
                        type: array
                        items:
                          type: string
                        description: The member's effective permissions
                        sorted.: null
              example:
                data:
                  grants:
                    - policies:write
                  revokes:
                    - sessions:write
                  permissions:
                    - audit:read
                    - connections:read
                    - policies:read
                    - policies:write
                    - sessions:read
        '400':
          $ref: '#/components/responses/ZodBadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            You are editing yourself, the target is the Owner, your plan has no
            role-based access control, or the change is not allowed for your
            role or the target's role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: The Owner's permissions can't be customized.
        '404':
          description: Member not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: The member's role changed while you were editing. Reload and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  responses:
    ZodBadRequest:
      description: The body failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ZodValidationError'
    Unauthorized:
      description: No valid session or API key, or the key's creator is no longer a member.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    ZodValidationError:
      type: object
      properties:
        success:
          type: boolean
          const: false
        error:
          type: object
          properties:
            name:
              type: string
              example: ZodError
            message:
              type: string
              description: JSON string of the validation issues.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: ig_...
      description: >-
        An Igris API key. It acts with the current role and permission overrides
        of the member who created it.

````

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