---
title: "Create Column"
method: POST
path: "/workspaces/{workspace_id}/tables/{table_id}/columns"
tags: ["tables"]
---

# Create Column

`POST /workspaces/{workspace_id}/tables/{table_id}/columns`

## Request

- Base URL: `https://platform.tracecat.com/api`
- URL: `https://platform.tracecat.com/api/workspaces/{workspace_id}/tables/{table_id}/columns`
- Auth: one of:
  - API key in cookie `fastapiusersauth`
  - HTTP bearer

Add a column to a table.

## Path parameters

- `table_id` string, uuid, required
- `workspace_id` string, uuid, required

## Request body

- TableColumnCreate: Create model for a table column.
  - `name` string, required: The name of the column
  - `type` 'TEXT' | 'INTEGER' | 'NUMERIC' | 'DATE' | 'BOOLEAN' | 'TIMESTAMPTZ' | 'JSONB' | 'SELECT' | 'MULTI_SELECT', required: Supported SQL types.
  - `nullable` boolean
  - `default` unknown
  - `is_index` boolean: Whether to create a unique index on the column
  - `options` string[], nullable

## Response `201`

Successful Response

- TableColumnRead: Definition for a table column.
  - `id` string, uuid, required
  - `name` string, required
  - `type` 'TEXT' | 'INTEGER' | 'NUMERIC' | 'DATE' | 'BOOLEAN' | 'TIMESTAMPTZ' | 'JSONB' | 'SELECT' | 'MULTI_SELECT', required: Supported SQL types.
  - `nullable` boolean
  - `default` unknown
  - `is_index` boolean
  - `options` string[], nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/tracecat/apis/tracecat-api.md) - [All operations](https://skmtc.dev/tracecat/apis/tracecat-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tracecat/apis/tracecat-api/revisions/2efdda25045f?raw)
