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

# Create a space



## OpenAPI

````yaml /api-reference/endpoint/workspaces/openapi.json post /workspaces/space
openapi: 3.0.3
info:
  title: Workspaces Service API
  version: 1.0.0
  description: API for managing workspaces, tasks, and comments
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /workspaces/space:
    post:
      summary: Create a space
      operationId: createSpace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSpaceRequest'
      responses:
        '200':
          description: Created space
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Space'
        '400':
          $ref: '#/components/responses/BadRequest'
components:
  schemas:
    CreateSpaceRequest:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: >-
            Unique identifier for the space. Tasks belonging to the space
            receive IDs prefixed with this value. Must consist of letters,
            numbers, and underscores only.
        name:
          type: string
        description:
          type: string
        default_status:
          type: string
        statuses:
          type: array
          items:
            $ref: '#/components/schemas/SpaceStatus'
        record_config_ids:
          type: array
          items:
            type: string
        default_record_config_id:
          type: array
          items:
            type: string
        staging:
          type: boolean
          description: >-
            Marks a Space for testing so it can be reset. Only root and admin
            users can set it.
    Space:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        url:
          type: string
          readOnly: true
          description: UI URL to navigate directly to this space
        name:
          type: string
        description:
          type: string
        default_status:
          type: string
        statuses:
          type: array
          items:
            $ref: '#/components/schemas/SpaceStatus'
        owner:
          type: string
          readOnly: true
          description: ID of the user who created the space, set by the backend
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
        record_config_ids:
          type: array
          items:
            type: string
        default_record_config_id:
          type: array
          items:
            type: string
        priorities:
          type: array
          items:
            type: object
            additionalProperties: true
        tags:
          type: array
          items:
            type: object
            additionalProperties: true
        staging:
          type: boolean
          description: >-
            Marks a space for testing. Only root and admin users can set it.
            Staging spaces can be reset.
        distribution_bindings:
          type: array
          readOnly: true
          description: >-
            Connections to other accounts. Present on a space connected through
            distribution.
          items:
            type: object
            additionalProperties: true
            properties:
              distribution_id:
                type: string
              product_id:
                type: string
              side:
                type: string
                enum:
                  - publisher
                  - distributor
              counterparty_account_id:
                type: string
              counterparty_name:
                type: string
              folder:
                type: string
              required_roles:
                type: array
                items:
                  type: string
              status_map:
                type: object
                additionalProperties:
                  type: string
              bound_at:
                type: string
                format: date-time
    SpaceStatus:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
        name:
          type: string
          description: e.g. To Do, In Progress, Done
        color:
          type: string
        order:
          type: integer
        is_visible:
          type: boolean
          nullable: true
        complete:
          type: boolean
          description: >-
            If true, when a task reaches this state, it will not be considered
            overdue past the due date.
          example: true
        role:
          type: string
          description: >-
            What the status means, such as `intake`, `acknowledged`, `working`
            or `done`. Used to map statuses between connected accounts.
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: Stable machine code. Branch on this, not on `error`.
      required:
        - error
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````

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