---
title: "Add Column"
method: POST
path: "/api/v1/tables/{tableId}/columns"
tags: ["Tables"]
---

# Add Column

`POST /api/v1/tables/{tableId}/columns`

Add a new column to the table schema. Optionally specify a position to insert the column at a specific index.

## Path parameters

- `tableId` string, required

## Request body

- object
  - `workspaceId` string, required — The workspace ID
  - `column` object, required
    - `name` string, required — Column name (alphanumeric and underscores, must start with letter or underscore)
    - `type` 'string' | 'number' | 'boolean' | 'date' | 'json', required — Column data type
    - `required` boolean — Whether the column requires a value
    - `unique` boolean — Whether column values must be unique
    - `position` integer — Position index to insert the column at (0-based). Appends if omitted.

## Response `200`

Column added successfully

- object
  - `success` boolean
  - `data` object
    - `columns` ColumnDefinition[]
      - `name` string, required — Column name. Must start with a letter or underscore.
      - `type` 'string' | 'number' | 'boolean' | 'date' | 'json', required — Data type of the column.
      - `required` boolean — Whether the column requires a value on insert.
      - `unique` boolean — Whether values in this column must be unique across all rows.

## Other responses

- `400` — Invalid request parameters. Check the details array for specific validation errors.
- `401` — Invalid or missing API key. Ensure the X-API-Key header is set with a valid key.
- `404` — The requested resource was not found. Verify the ID is correct and belongs to your workspace.
- `429` — Rate limit exceeded. Wait for the duration specified in the Retry-After header before retrying. The X-RateLimit-* headers accompany every response from an authenticated v1 request — success and error alike — and are omitted only when the request fails authentication, since no rate-limit bucket is consulted in that case.

---

[API](https://skmtc.net/simstudioai/apis/sim-api.md) · [All operations](https://skmtc.net/simstudioai/apis/sim-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/simstudioai/sim-api/versions/66a471c5b1df/schema)
