---
title: "Create new table"
method: POST
path: "/tables/create_table/{dbId}/{tableId}"
tags: ["Table Management"]
---

# Create new table

`POST /tables/create_table/{dbId}/{tableId}`

Create new table with metadata and optionally field definitions.

## Path parameters

- `dbId` string, required
- `tableId` string, required

## Request body

- object
  - `title` string — Table title
  - `description` string — Table description
  - `data_dictionary` object[] — Array of field definitions
    - `name` string — Field name
    - `label` string — Field label
    - `description` string — Field description
    - `data_type` string — Data type (string, integer, float, double, date, boolean, datetime, array, object, null)
    - `column_type` string — Column type (dimension, time_period, measure, attribute, indicator_id, indicator_name, geography, observation_value, periodicity)
    - `time_period_format` string — Time period format (e.g., YYYY, YYYY-MM)
    - `code_list` object[] — Inline code list
      - `code` union — Code value
        - string
        - number
      - `label` string — Code label
      - `description` string — Code description
    - `code_list_reference` object — External code list reference
      - `id` string — Code list ID
      - `name` string — Code list name
      - `version` string — Code list version
      - `uri` string — Code list URI
      - `note` string — Additional notes

## Response `200`

successful operation

- object
  - `status` string
  - `result` integer — Number of documents inserted (should be 1)
  - `fields_created` integer — Number of field definitions created
  - `message` string

## Other responses

- `400` — Validation error

## Changes

- **2025-12-01** `c9fac12336ea` — 1 info
  - endpoint added
- **2023-12-21** `1451f79c7f04` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/ihsn/apis/data-tables/changes/tables/create_table/:dbId/:tableId/post.md)

---

[API](https://skmtc.dev/ihsn/apis/data-tables.md) · [All operations](https://skmtc.dev/ihsn/apis/data-tables/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ihsn/data-tables/revisions/6fb7730a430d/schema)
