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

# Bulk Member Op

> Apply a bulk operation to multiple members.

Supported ops:
  - deactivate    set status='deactivated'
  - reactivate    set status='active'
  - change_role   set role=value (value must be one of admin|analyst|viewer|owner)

Requires members:write scope (admin).



## OpenAPI

````yaml /openapi.json post /v1/members/bulk
openapi: 3.1.0
info:
  description: Causeloop Platform Backend
  title: Causeloop API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/members/bulk:
    post:
      tags:
        - members
      summary: Bulk Member Op
      description: |-
        Apply a bulk operation to multiple members.

        Supported ops:
          - deactivate    set status='deactivated'
          - reactivate    set status='active'
          - change_role   set role=value (value must be one of admin|analyst|viewer|owner)

        Requires members:write scope (admin).
      operationId: bulk_member_op_v1_members_bulk_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkMemberRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkMemberResult'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    BulkMemberRequest:
      properties:
        ids:
          items:
            type: string
          maxItems: 200
          minItems: 1
          title: Ids
          type: array
        op:
          enum:
            - deactivate
            - reactivate
            - change_role
          title: Op
          type: string
        value:
          anyOf:
            - type: string
            - type: 'null'
          title: Value
      required:
        - op
        - ids
      title: BulkMemberRequest
      type: object
    BulkMemberResult:
      properties:
        errors:
          default: []
          items:
            additionalProperties: true
            type: object
          title: Errors
          type: array
        failed:
          title: Failed
          type: integer
        succeeded:
          title: Succeeded
          type: integer
        total:
          title: Total
          type: integer
      required:
        - total
        - succeeded
        - failed
      title: BulkMemberResult
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        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:
    HTTPBearer:
      scheme: bearer
      type: http

````