> ## 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.

# Update workspaces of a company member

> This endpoint allows you to update the workspaces of a company member.

Note that this will update all the workspaces of the member.

It is restricted to admin and company admin users.



## OpenAPI

````yaml /api-reference/openapi-v2.yaml put /api/v2/users/{id}/workspaces/update/
openapi: 3.0.3
info:
  title: Paradigm API
  version: xenial-xerus (v2)
  description: >-
    A versatile and adaptable tool designed to integrate Generative AI into your
    applications
servers:
  - url: https://paradigm.lighton.ai
security: []
tags:
  - name: Models
    description: Operations about AI models
  - name: Files Search
    description: Operations about files search
  - name: Files
    description: Operations about files
  - name: Upload Sessions
    description: Operations about upload sessions
  - name: Workspaces
    description: Operations about workspaces
  - name: Users
    description: Operations about users
  - name: Companies
    description: Operations about companies
  - name: SCIM
    description: Operations about SCIM
  - name: Feedbacks
    description: Operations about feedbacks
  - name: Reporting
    description: Operations about reporting
  - name: Monitoring
    description: Operations about monitoring
  - name: Platform Status
    description: Operations about platform status
paths:
  /api/v2/users/{id}/workspaces/update/:
    put:
      tags:
        - Users
      summary: Update workspaces of a company member
      description: |-
        This endpoint allows you to update the workspaces of a company member.

        Note that this will update all the workspaces of the member.

        It is restricted to admin and company admin users.
      operationId: api_v2_users_workspaces_update_update
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: The unique identifier of the user.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCompanyMemberWorkspacesRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/UpdateCompanyMemberWorkspacesRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UpdateCompanyMemberWorkspacesRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyMemberResponse'
          description: ''
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateCompanyMemberWorkspacesRequest:
      type: object
      properties:
        workspaces:
          type: array
          items:
            type: integer
    CompanyMemberResponse:
      type: object
      properties:
        id:
          type: integer
        username:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
        is_active:
          type: boolean
        date_joined:
          type: string
          format: date-time
        account_expiration_date:
          type: string
          format: date-time
        last_login:
          type: string
          format: date-time
        invitation_status:
          type: string
        language:
          type: string
        company:
          $ref: '#/components/schemas/CompanyMemberCompany'
        roles:
          type: array
          items:
            $ref: '#/components/schemas/TenantUserRole'
        groups:
          type: array
          items:
            $ref: '#/components/schemas/CompanyMemberGroups'
      required:
        - account_expiration_date
        - company
        - date_joined
        - email
        - first_name
        - groups
        - id
        - invitation_status
        - is_active
        - language
        - last_login
        - last_name
        - roles
        - username
    CompanyMemberCompany:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
      required:
        - id
        - name
    TenantUserRole:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
      required:
        - id
        - name
    CompanyMemberGroups:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type: string
        role:
          type: string
        category:
          type: string
        created_at:
          type: string
          format: date-time
      required:
        - category
        - created_at
        - description
        - id
        - name
        - role
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````