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

# Create a workspace

> Creates a workspace; the caller becomes its owner.



## OpenAPI

````yaml https://staging.soma.evarist.com/v1/openapi.json post /workspaces
openapi: 3.1.0
info:
  title: Soma API
  summary: 'Your organization''s knowledge: documents, search, knowledge graph, answers.'
  description: >-
    Authenticate with `Authorization: Bearer <token>`: an OAuth access token
    (the Soma CLI and MCP clients get one by signing in) or an API key created
    in Soma under Account settings.
  version: 1.0.0
servers:
  - url: https://staging.soma.evarist.com/v1
security: []
paths:
  /workspaces:
    post:
      tags:
        - Workspaces
      summary: Create a workspace
      description: Creates a workspace; the caller becomes its owner.
      operationId: create_workspace_workspaces_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
        '403':
          description: Read-only token, or not allowed in this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    WorkspaceCreate:
      properties:
        name:
          type: string
          maxLength: 256
          minLength: 1
          title: Name
        description:
          anyOf:
            - type: string
              maxLength: 4000
            - type: 'null'
          title: Description
      type: object
      required:
        - name
      title: WorkspaceCreate
    Workspace:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        ready:
          type: boolean
          title: Ready
          description: Whether the knowledge base can be queried.
        document_count:
          type: integer
          title: Document Count
          description: Documents in the knowledge base.
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      type: object
      required:
        - id
        - name
        - ready
        - document_count
        - created_at
      title: Workspace
    Error:
      properties:
        error:
          $ref: '#/components/schemas/Body'
      type: object
      required:
        - error
      title: Error
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Body:
      properties:
        type:
          type: string
          title: Type
        message:
          type: string
          title: Message
      type: object
      required:
        - type
        - message
      title: Body
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      description: An OAuth access token (`soma_at_…`) or an API key (`scribe_mcp_…`).
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.