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

# Bulk replace workspace members

> ⚠️ **ALPHA ENDPOINT** - This endpoint is in alpha and subject to breaking changes. Use with caution in production environments.

Add a new member (user or group) to a custom workspace. This endpoint can only be used by company level admins.



## OpenAPI

````yaml /api-reference/openapi-v3-company.yaml put /api/v3/company/workspaces/{id}/members
openapi: 3.0.3
info:
  title: Paradigm API
  version: xenial-xerus (v3-company)
  description: >-
    A versatile and adaptable tool designed to integrate Generative AI into your
    applications
servers:
  - url: https://paradigm.lighton.ai
security: []
tags:
  - name: Workspaces
    description: Operations about workspaces
paths:
  /api/v3/company/workspaces/{id}/members:
    put:
      tags:
        - Workspaces
      summary: Bulk replace workspace members
      description: >-
        ⚠️ **ALPHA ENDPOINT** - This endpoint is in alpha and subject to
        breaking changes. Use with caution in production environments.


        Add a new member (user or group) to a custom workspace. This endpoint
        can only be used by company level admins.
      operationId: api_v3_company_workspaces_members_update
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstanceWorkspaceAddMemberV3Request'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/InstanceWorkspaceAddMemberV3Request'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/InstanceWorkspaceAddMemberV3Request'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceMembersV3Response'
          description: ''
      security:
        - bearerAuth: []
components:
  schemas:
    InstanceWorkspaceAddMemberV3Request:
      type: object
      description: >-
        V3 API: Request serializer for adding a member to a workspace
        (admin-only endpoint)
      properties:
        user_id:
          type: integer
        group_id:
          type: integer
        role:
          $ref: '#/components/schemas/RoleEnum'
      required:
        - role
    WorkspaceMembersV3Response:
      type: object
      description: V3 Response serializer for workspace members.
      properties:
        users:
          type: array
          items:
            $ref: '#/components/schemas/UserMember'
        groups:
          type: array
          items:
            $ref: '#/components/schemas/GroupMember'
      required:
        - groups
        - users
    RoleEnum:
      enum:
        - owner
        - editor
        - viewer
      type: string
      description: |-
        * `owner` - Owner
        * `editor` - Editor
        * `viewer` - Viewer
    UserMember:
      type: object
      properties:
        id:
          type: integer
        email:
          type: string
        role:
          type: string
      required:
        - email
        - id
        - role
    GroupMember:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        role:
          type: string
      required:
        - id
        - name
        - role
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````