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

# Bulk Update User Roles

> Bulk-update multiple users to the same target role.

WorkOS has no bulk-membership endpoint, so we fan out per-user with a
bounded concurrency. Cross-org targets are silently dropped (the loader
pattern's tenant-enumeration mitigation: we don't leak whether they
exist in another org). Returns per-row success/failure.



## OpenAPI

````yaml /openapi.json post /api/v1/shared/users/role/bulk
openapi: 3.1.0
info:
  title: Seamind Backend
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/shared/users/role/bulk:
    post:
      tags:
        - shared-users
      summary: Bulk Update User Roles
      description: |-
        Bulk-update multiple users to the same target role.

        WorkOS has no bulk-membership endpoint, so we fan out per-user with a
        bounded concurrency. Cross-org targets are silently dropped (the loader
        pattern's tenant-enumeration mitigation: we don't leak whether they
        exist in another org). Returns per-row success/failure.
      operationId: bulk_update_user_roles_api_v1_shared_users_role_bulk_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkUpdateUserRoleDTO'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkRoleUpdateResponseDTO'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BulkUpdateUserRoleDTO:
      properties:
        userIds:
          items:
            type: string
            format: uuid
          type: array
          title: Userids
        role:
          type: string
          title: Role
      type: object
      required:
        - userIds
        - role
      title: BulkUpdateUserRoleDTO
      description: Payload for changing many users' roles to the same target role.
    BulkRoleUpdateResponseDTO:
      properties:
        results:
          items:
            $ref: '#/components/schemas/BulkRoleUpdateItemDTO'
          type: array
          title: Results
        successCount:
          type: integer
          title: Successcount
        failedCount:
          type: integer
          title: Failedcount
      type: object
      required:
        - results
        - successCount
        - failedCount
      title: BulkRoleUpdateResponseDTO
      description: Response for the bulk role-update endpoint.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BulkRoleUpdateItemDTO:
      properties:
        userId:
          type: string
          format: uuid
          title: Userid
        status:
          type: string
          title: Status
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - userId
        - status
      title: BulkRoleUpdateItemDTO
      description: Per-user result in a bulk role update.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````