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

# Create Workspace

> Create a new workspace for the authenticated user.



## OpenAPI

````yaml POST /workspaces
openapi: 3.1.0
info:
  title: Lancepilot API
  description: API for Lancepilot
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://lancepilot.com/api/v3
security:
  - bearerAuth: []
paths:
  /workspaces:
    post:
      tags:
        - Workspace
      summary: Create a new workspace
      description: Create a new workspace for the authenticated user.
      requestBody:
        description: Workspace creation parameters.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - type
                - status
              properties:
                name:
                  type: string
                  description: Unique name per user.
                type:
                  type: string
                  enum:
                    - INTERNAL
                    - PARTNER
                  description: Type of workspace.
                status:
                  type: boolean
                  description: Workspace status (active/inactive).
      responses:
        '201':
          $ref: '#/components/responses/201'
        '401':
          $ref: '#/components/responses/401'
        '422':
          $ref: '#/components/responses/422'
components:
  responses:
    '201':
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                example: 201
              message:
                type: string
                example: Resource created successfully.
              data:
                type: object
                description: Created resource data.
            required:
              - status
              - message
              - data
    '401':
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthenticated.
            required:
              - message
    '422':
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Validation error
              errors:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````