> ## 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.1.0
info:
  title: Workspaces API
  version: 1.1.0
  description: >-
    Spaces, tasks, task actions, comments, folders and the task-sync routes.
    Task-sync routes also accept an integration token (`oauth2`); every other
    route needs a user session or API key.
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Tasks
  - name: Files
  - name: Folders
  - name: Task Schedules
  - name: Distribution
paths:
  /workspaces/space:
    post:
      tags:
        - Spaces
      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'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
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
        related_tasks:
          type: boolean
          description: >-
            Shows the Related tickets section on tasks in this space and lets
            them link to others.
        allow_linking:
          type: boolean
          description: Opens the space to links with other accounts.
        task_automations:
          type: array
          description: Rules that act on tasks left in given statuses for a number of days.
          items:
            type: object
            required:
              - id
              - statuses
              - after_days
              - action
            properties:
              id:
                type: string
              enabled:
                type: boolean
              statuses:
                type: array
                items:
                  type: string
              after_days:
                type: integer
              action:
                type: object
                required:
                  - type
                properties:
                  type:
                    type: string
                additionalProperties: true
              run_as_user_id:
                type: string
                readOnly: true
                description: >-
                  Stamped by the server from the session of whoever last changed
                  the rule.
        view:
          type: object
          additionalProperties: true
          description: >-
            Presentation settings: `tasks`, `records` (including `saved_views`),
            `front_page` (including `layouts`), `dashboard`, `entities`,
            `assistant_skills`.
        base_record:
          type: object
          additionalProperties: true
          description: >-
            The record config and identity fields that define the space's client
            or organisation entity.
        custom_tab:
          type: object
          additionalProperties: true
          description: The space's own tab of buttons.
        hidden_tabs:
          type: array
          items:
            type: string
          description: Built-in tabs the space does not offer.
        assigned_qa_users:
          type: array
          items:
            type: string
          description: Users offered as a task's `assigned_qa`. Empty hides the field.
        task_export_fields:
          type: array
          items:
            type: object
            required:
              - key
            properties:
              key:
                type: string
              label:
                type: string
          description: Columns of a task export, in order.
        logo_key:
          type: string
          readOnly: true
          description: >-
            Key of a logo in the public profile-images bucket, set when the
            space was built from a template. Create-only.
        template:
          type: object
          additionalProperties: true
          readOnly: true
          description: >-
            Stamp left by the template the space was installed from. Kept as
            sent and read only by the platform.
        editing_disabled:
          type: boolean
          readOnly: true
          description: >-
            When true the space is locked: update and delete are refused.
            Create-only, with no unlock.
    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
            - 'null'
        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
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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