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

# Update member roles

> Change the Agent Vault role of users, groups and machine identities. Name each one by ID; to add users by email or username, use Add members.



## OpenAPI

````yaml PATCH /api/v1/agent-vault/members
openapi: 3.0.3
info:
  title: Infisical API
  description: List of all available APIs that can be consumed
  version: 0.0.1
servers:
  - url: https://us.infisical.com
    description: Production server (US)
  - url: https://eu.infisical.com
    description: Production server (EU)
  - url: http://localhost:8080
    description: Local server
security: []
paths:
  /api/v1/agent-vault/members:
    patch:
      tags:
        - Agent Vault Members
      description: >-
        Change the Agent Vault role of users, groups and machine identities.
        Name each one by ID; to add users by email or username, use Add members.
      operationId: updateAgentVaultMemberRoles
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    userIds:
                      type: array
                      items:
                        type: string
                        format: uuid
                      default: []
                      description: The IDs of the users to act on.
                    machineIdentityIds:
                      type: array
                      items:
                        type: string
                        format: uuid
                      default: []
                      description: The IDs of the machine identities to act on.
                    groupIds:
                      type: array
                      items:
                        type: string
                        format: uuid
                      default: []
                      description: The IDs of the groups to act on.
                    role:
                      type: string
                      enum:
                        - admin
                        - member
                      description: 'The Agent Vault role: admin or member.'
                      x-default: member
                  required:
                    - role
                - type: object
                  properties:
                    projectId:
                      type: string
                      minLength: 1
                      maxLength: 36
                      description: The ID of the Agent Vault project.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  members:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - user
                              description: >-
                                Whether this member is a user, a machine
                                identity or a group.
                            id:
                              type: string
                              format: uuid
                              description: The ID of the user, machine identity or group.
                            role:
                              type: string
                              description: 'The Agent Vault role: admin or member.'
                            addedAt:
                              type: string
                              format: date-time
                              description: When the member was added to the project.
                          required:
                            - type
                            - id
                            - role
                            - addedAt
                          additionalProperties: false
                          title: User
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - machineIdentity
                              description: >-
                                Whether this member is a user, a machine
                                identity or a group.
                            id:
                              type: string
                              format: uuid
                              description: The ID of the user, machine identity or group.
                            role:
                              type: string
                              description: 'The Agent Vault role: admin or member.'
                            addedAt:
                              type: string
                              format: date-time
                              description: When the member was added to the project.
                          required:
                            - type
                            - id
                            - role
                            - addedAt
                          additionalProperties: false
                          title: Machine identity
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - group
                              description: >-
                                Whether this member is a user, a machine
                                identity or a group.
                            id:
                              type: string
                              format: uuid
                              description: The ID of the user, machine identity or group.
                            role:
                              type: string
                              description: 'The Agent Vault role: admin or member.'
                            addedAt:
                              type: string
                              format: date-time
                              description: When the member was added to the project.
                          required:
                            - type
                            - id
                            - role
                            - addedAt
                          additionalProperties: false
                          title: Group
                  skipped:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - user
                              description: >-
                                Whether this member is a user, a machine
                                identity or a group.
                            id:
                              type: string
                              format: uuid
                              description: The ID of the user, machine identity or group.
                          required:
                            - type
                            - id
                          additionalProperties: false
                          title: User
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - machineIdentity
                              description: >-
                                Whether this member is a user, a machine
                                identity or a group.
                            id:
                              type: string
                              format: uuid
                              description: The ID of the user, machine identity or group.
                          required:
                            - type
                            - id
                          additionalProperties: false
                          title: Machine identity
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - group
                              description: >-
                                Whether this member is a user, a machine
                                identity or a group.
                            id:
                              type: string
                              format: uuid
                              description: The ID of the user, machine identity or group.
                          required:
                            - type
                            - id
                          additionalProperties: false
                          title: Group
                    description: >-
                      The requested members who did not have access to the
                      project or already had the role, so nothing was changed.
                required:
                  - members
                  - skipped
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 422
                  message: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false

````

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