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

# Create a workspace

> This endpoint allows you to create a workspace within a specific company.

This is useful for organizing and managing different projects or groups within the company.

It is restricted to admin and company admin users.



## OpenAPI

````yaml /api-reference/openapi-v2.yaml post /api/v2/companies/{id}/workspaces/create/
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/companies/{id}/workspaces/create/:
    post:
      tags:
        - Workspaces
      summary: Create a workspace
      description: >-
        This endpoint allows you to create a workspace within a specific
        company.


        This is useful for organizing and managing different projects or groups
        within the company.


        It is restricted to admin and company admin users.
      operationId: api_v2_companies_workspaces_create_create
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: The unique identifier of the company.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWorkspaceV2Request'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateWorkspaceV2Request'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateWorkspaceV2Request'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceWithRelationsResponse'
          description: ''
      security:
        - bearerAuth: []
components:
  schemas:
    CreateWorkspaceV2Request:
      type: object
      description: 'V2 API: Uses flat structure with separate members and groups fields'
      properties:
        name:
          type: string
        description:
          type: string
        members:
          type: array
          items:
            type: integer
        groups:
          type: array
          items:
            type: integer
        document_upload_method:
          allOf:
            - $ref: '#/components/schemas/DocumentUploadMethodEnum'
          default: manual
          description: |-
            Method for adding documents to this workspace

            * `manual` - manual
            * `synced` - synced
      required:
        - description
        - name
    WorkspaceWithRelationsResponse:
      type: object
      description: Mixin providing get_membership_role method for workspace serializers.
      properties:
        id:
          type: integer
        name:
          type: string
        workspace_type:
          type: string
        document_upload_method:
          type: string
        description:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        summaries:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceSummaryResponse'
        user_role:
          type: string
          readOnly: true
        collection:
          $ref: '#/components/schemas/WorkspaceCollection'
      required:
        - collection
        - created_at
        - description
        - document_upload_method
        - id
        - name
        - summaries
        - updated_at
        - user_role
        - workspace_type
    DocumentUploadMethodEnum:
      enum:
        - manual
        - synced
      type: string
      description: |-
        * `manual` - manual
        * `synced` - synced
    WorkspaceSummaryResponse:
      type: object
      properties:
        language:
          type: string
        summary:
          type: string
      required:
        - language
        - summary
    WorkspaceCollection:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
      required:
        - id
        - name
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````