---
title: "Create new document table"
method: POST
path: "/v1/table"
tags: ["Table"]
---

# Create new document table

`POST /v1/table`

Create a new document table within a hub.

## Request body

- CreateTable
  - `context` BaseRequestContext
    - `projectId` string, uuid
    - `processPublicId` string, uuid, nullable
    - `processSectionPublicId` string, uuid, nullable
    - `processResponsePublicId` string, uuid, nullable
  - `projectId` string, uuid, required
  - `name` string, required
  - `type` string
  - `columns` TableColumn[], required
    - `publicId` string, uuid
    - `name` string
    - `kind` 'text' | 'datetime' | 'date' | 'link' | 'multilink' | 'select' | 'multiselect' | 'integer' | 'float' | 'percentage' | 'tag' | 'variable' | 'attachment' | 'phone' | 'email' | 'vote' | 'checkbox' | 'duration'
    - `width` integer
    - `description` union
      - object, nullable
      - Draftjs
        - `content` DraftjsContent, required
          - `blocks` DraftjsBlock[], required
            - `data` object, required
            - `depth` integer, required
            - `entityRanges` DraftjsEntityRange[], required
              - …
            - `inlineStyleRanges` DraftjsInlineStyleRange[], required
              - …
            - `key` string, required
            - `text` string, required
            - `type` string, required
          - `entityMap` object, required
    - `kindOptions` SelectOptionsLookup
      - `tableOptions` SelectTableOptions
        - `columnId` string
        - `tableId` string
        - `viewId` string
        - `dependencies` SelectTableDependency[], nullable
          - `columnId` string, required
          - `columnJoinId` string, nullable
        - `liveValues` boolean
      - `manualOptions` string[]
      - `autopopulate` boolean
    - `alterOptions` union
      - TableColumnAlter
        - `dateConversionFormat` 'DD/MM/YYYY' | 'MM/DD/YYYY' | 'ISO8601' | 'DD-Mon-YY'
        - `runScriptOnAllCells` boolean
      - object, nullable
    - `isIndexed` boolean
    - `script` string, nullable
    - `scriptEnabled` boolean
    - `formula` string, nullable
    - `formulaEnabled` boolean
    - `aggregate` integer
    - `isJoined` boolean, nullable
    - `thousandSeparator` boolean
    - `displayLink` boolean
    - `decimalPlaces` integer
    - `dateFormat` string, nullable
    - `headerBackgroundColor` string, nullable
    - `headerTextColor` string, nullable
    - `exportWidth` integer, nullable
    - `isSynced` boolean
  - `joins` TableJoin2[]
    - `joinTableName` string
    - `joinViewId` string
    - `joinViewName` string
    - `isOneToMany` boolean
    - `joinColumns` TableColumnJoin[]
      - `sourceColumnId` string
      - `targetColumnId` string
    - `dataColumns` TableJoinImportedColumns[]
      - `sourceColumnId` string
      - `targetColumnId` string

## Response `200`

Successfully created the table

- object
  - `data` Table
    - `publicId` string, uuid
    - `autodeskBim360ModelProperties` unknown
    - `name` string
    - `type` string
    - `logo` string
    - `columns` TableColumn[]
      - `publicId` string, uuid
      - `name` string
      - `kind` 'text' | 'datetime' | 'date' | 'link' | 'multilink' | 'select' | 'multiselect' | 'integer' | 'float' | 'percentage' | 'tag' | 'variable' | 'attachment' | 'phone' | 'email' | 'vote' | 'checkbox' | 'duration'
      - `width` integer
      - `description` union
        - object, nullable
        - Draftjs
          - `content` DraftjsContent, required
            - `blocks` DraftjsBlock[], required
              - …
            - `entityMap` object, required
      - `kindOptions` SelectOptionsLookup
        - `tableOptions` SelectTableOptions
          - `columnId` string
          - `tableId` string
          - `viewId` string
          - `dependencies` SelectTableDependency[], nullable
            - `columnId` string, required
            - `columnJoinId` string, nullable
          - `liveValues` boolean
        - `manualOptions` string[]
        - `autopopulate` boolean
      - `alterOptions` union
        - TableColumnAlter
          - `dateConversionFormat` 'DD/MM/YYYY' | 'MM/DD/YYYY' | 'ISO8601' | 'DD-Mon-YY'
          - `runScriptOnAllCells` boolean
        - object, nullable
      - `isIndexed` boolean
      - `script` string, nullable
      - `scriptEnabled` boolean
      - `formula` string, nullable
      - `formulaEnabled` boolean
      - `aggregate` integer
      - `isJoined` boolean, nullable
      - `thousandSeparator` boolean
      - `displayLink` boolean
      - `decimalPlaces` integer
      - `dateFormat` string, nullable
      - `headerBackgroundColor` string, nullable
      - `headerTextColor` string, nullable
      - `exportWidth` integer, nullable
      - `isSynced` boolean
    - `projects` Project[]
      - `publicId` string
      - `name` string
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `deletedAt` string, date-time
    - `isDeleted` boolean
    - `defaultViewId` string
    - `joins` TableJoin[], nullable
      - `publicId` string, uuid
      - `joinTableId` string
      - `joinViewId` string
      - `isOneToMany` boolean
      - `joinColumns` TableColumnJoin[]
        - `sourceColumnId` string
        - `targetColumnId` string
      - `dataColumns` TableJoinImportedColumns[]
        - `sourceColumnId` string
        - `targetColumnId` string
    - `keepValidationsInSync` boolean
    - `keepColoursInSync` boolean
    - `allowComments` boolean
    - `isReferenceTable` boolean
    - `isViewpointSynced` boolean
    - `isViewpointRfisSynced` boolean
    - `isAutodeskBim360Synced` boolean
    - `isAutodeskBim360ChecklistsSynced` boolean
    - `isAutodeskBim360IssuesSynced` boolean
    - `isAutodeskBim360ModelsSynced` boolean
    - `isAutodeskBim360UsersSynced` boolean
    - `isProcoreSynced` boolean
    - `isAconexSynced` boolean
    - `isAconexWorkflowsSynced` boolean
    - `isAsiteDocumentsSynced` boolean
    - `isAsiteFormsSynced` boolean
    - `isMortaSynced` boolean
    - `isMortaProjectsSynced` boolean
    - `isMortaResourcesSynced` boolean
    - `isMortaCommentsSynced` boolean
    - `isMortaColumnsSynced` boolean
    - `isMortaUsersSynced` boolean
    - `isReviztoIssuesSynced` boolean
    - `isSynced` boolean
    - `syncUser` User3
      - `publicId` string, uuid
      - `name` string
    - `lastSync` string, date-time
    - `isSyncing` boolean
    - `syncHourlyFrequency` integer
    - `failedSyncAttempts` integer
    - `projectPublicId` string, uuid
    - `projectName` string
    - `lockedFromDuplication` boolean
  - `metadata` object

## Other responses

- `403` — Unauthorized action - User lacks necessary permissions.
- `404` — That hub does not exist.

---

[API](https://skmtc.net/morta-technology/apis/morta-api-reference.md) · [All operations](https://skmtc.net/morta-technology/apis/morta-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/morta-technology/morta-api-reference/versions/9c58c1c1e7e8/schema)
