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

# Update organization member roles

> Update organization roles for specific members

Requires an enterprise admin personal API key.

Updates the organization-level roles for one or more members within a specific organization. This endpoint allows you to assign a new organization role to multiple users at once.


## OpenAPI

````yaml /v2-openapi.yaml PATCH /v2/enterprise/organizations/{org_id}/members/roles
openapi: 3.1.0
info:
  description: Devin v2 API with Personal API Keys for Enterprise Admins
  title: Devin API v2
  version: 2.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v2/enterprise/organizations/{org_id}/members/roles:
    patch:
      tags:
        - organizations
      summary: Enterprise Organization Members Role Update Endpoint
      description: |-
        Update organization roles for users available to the user's enterprise.
        Takes a list of user_ids and a role_id.
      operationId: >-
        enterprise_organization_members_role_update_endpoint_v2_enterprise_organizations__org_id__members_roles_patch
      parameters:
        - in: path
          name: org_id
          required: true
          schema:
            title: Org Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    RoleUpdateRequest:
      properties:
        role_id:
          title: Role Id
          type: string
        user_ids:
          items:
            type: string
          title: User Ids
          type: array
      required:
        - user_ids
        - role_id
      title: RoleUpdateRequest
      type: object
    SuccessResponse:
      properties:
        status:
          default: success
          title: Status
          type: string
      title: SuccessResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: Personal API Key (apk_user_*) for Enterprise Admins only
      scheme: bearer
      type: http

````