Columns
List, create, get, and update columns
List Columns
/api/v1/tables/{tableId}/columnsReturns all columns for a table, ordered by index.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
tableId | string | path | Yes | The table ID |
Request
const res = await fetch(
"https://app.limai.io/api/v1/tables/tbl_abc123/columns",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);
const { data } = await res.json();Response
{
"data": [
{
"id": "col_001",
"name": "Invoice Number",
"slug": "invoice_number",
"type": "TEXT",
"description": null,
"isKey": true,
"isList": false,
"dateFormat": "EU",
"measurementType": "LEVENSHTEIN",
"excludedFromExtraction": false,
"defaultValue": null,
"defaultValueEnabled": false,
"autoGenerateLabels": false,
"autoGenerateUnits": false,
"index": 0,
"labels": [],
"units": []
}
]
}Create Column
/api/v1/tables/{tableId}/columnsCreates one or more columns in a table. Supports both single column and bulk creation (wrap in a columns array).
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
tableId | string | path | Yes | The table ID |
name | string | body | Yes | Column name |
slug | string | body | No | Stable identifier matching ^[a-z][a-z0-9_]{0,63}$, unique within the table. Auto-generated from the name when omitted. |
type | string | body | No | Column type: TEXT, NUMBER, DATE, BOOLEAN, LABEL, MEASUREMENT(default: TEXT) |
description | string | body | No | Column description for the model |
isKey | boolean | body | No | Whether this is a key column(default: false) |
isList | boolean | body | No | Whether this column accepts list values(default: false) |
labels | array | body | No | Array of {name, color} for LABEL columns. Label names are stored uppercase |
autoGenerateLabels | boolean | body | No | Let extraction create labels that are not in the list(default: false) |
units | array | body | No | Array of {name} for NUMBER_WITH_UNIT columns |
autoGenerateUnits | boolean | body | No | Let extraction pick units from the document instead of a fixed list(default: false) |
Label names and LABEL cell values are normalized to uppercase on every write, so a labels entry sent as Active is stored, returned and matched at extraction time as ACTIVE.
A NUMBER_WITH_UNIT column must have at least one unit unless autoGenerateUnits is true. A request that would leave it with neither is rejected with 400 NUMBER_WITH_UNIT columns need at least one unit or autoGenerateUnits enabled; otherwise the extraction prompt would restrict the model to an empty list of units and every cell would come back without one.
Request
const res = await fetch(
"https://app.limai.io/api/v1/tables/tbl_abc123/columns",
{
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Total Amount",
type: "NUMBER",
description: "The total invoice amount including tax",
}),
}
);Response
{
"id": "col_new",
"name": "Total Amount",
"slug": "total_amount",
"type": "NUMBER",
"description": "Total invoice amount including tax",
"isKey": false,
"isList": false,
"dateFormat": "EU",
"measurementType": "LEVENSHTEIN",
"excludedFromExtraction": false,
"index": 3,
"labels": [],
"units": [],
"createdAt": "2025-01-15T10:30:00.000Z"
}Get Column
/api/v1/columns/{columnId}Returns details of a specific column.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
columnId | string | path | Yes | The column ID |
Request
const res = await fetch(
"https://app.limai.io/api/v1/columns/col_abc123",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);
const column = await res.json();Response
{
"id": "col_abc123",
"name": "Invoice Number",
"type": "TEXT",
"description": null,
"isList": false,
"dateFormat": "EU",
"tableId": "tbl_001",
"excludedFromExtraction": false,
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-15T00:00:00.000Z"
}Update Column
/api/v1/columns/{columnId}Update a column's properties.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
columnId | string | path | Yes | The column ID |
name | string | body | No | New column name |
description | string | body | No | New description |
type | string | body | No | New column type |
isList | boolean | body | No | Whether this column accepts list values |
dateFormat | string | body | No | Date format: EU or US |
excludedFromExtraction | boolean | body | No | Whether to exclude from extraction |
units | array | body | No | Array of {name}; replaces the stored unit list |
autoGenerateUnits | boolean | body | No | Let extraction pick units from the document instead of a fixed list |
The unit rule applies to the merged result: switching type to NUMBER_WITH_UNIT, sending units: [], or setting autoGenerateUnits: false is rejected with a 400 when the column would end up with no units and auto-generation off.
Request
const res = await fetch(
"https://app.limai.io/api/v1/columns/col_abc123",
{
method: "PATCH",
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
description: "Unique invoice identifier",
}),
}
);Response
{
"id": "col_abc123",
"name": "Invoice Number",
"description": "Unique invoice identifier",
"type": "TEXT",
"isList": false,
"dateFormat": "EU",
"excludedFromExtraction": false,
"updatedAt": "2025-01-15T12:00:00.000Z"
}