Limai Docs
API ReferenceTables & Rows

Rows

Create and delete rows in a table

Create Rows

POST/api/v1/tables/{tableId}/rows

Creates one or more rows in a table with cell values. Cell keys should be column names. For child tables, each row must include a parentRowId.

Parameters

NameTypeInRequiredDescription
tableIdstringpathYesThe table ID
fileIdstringbodyYesFile ID to associate with these rows
deploymentIdstringbodyYesID of the model the table belongs to. A different ID, including a deployment's, is rejected with 400.
jobIdstringbodyNoExtraction job these rows are the output of. When set, the rows are stored as the model's extraction: every active column gets a cell, column defaults apply, and each value is also recorded as the extracted baseline. The job must belong to this file and model and still be PROCESSING or FAILED; otherwise the request is rejected (404 for an unknown job, 400 otherwise). Without it, the rows are stored as manual input.
rowsarraybodyYesArray of row objects with cells and optional parentRowId

Each row object:

NameTypeInRequiredDescription
cellsobjectbodyYesKey-value pairs where keys are column names
parentRowIdstringbodyNoRequired for child table rows
indexnumberbodyNoRow index (auto-assigned if omitted)

Request

const res = await fetch(
"https://app.limai.io/api/v1/tables/tbl_abc123/rows",
{
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    fileId: "file_001",
    deploymentId: "dep_001",
    rows: [
      {
        cells: {
          "Invoice Number": "INV-2025-001",
          "Date": "2025-01-15",
          "Total": 1250.00,
        },
      },
    ],
  }),
}
);

Response

Response200
{
  "rowsCreated": 1,
  "rowIds": [
    "row_new_001"
  ]
}

Delete Rows

DELETE/api/v1/tables/{tableId}/rows

Deletes all rows in a table that are associated with a specific file.

Parameters

NameTypeInRequiredDescription
tableIdstringpathYesThe table ID
fileIdstringbodyYesFile ID to delete rows for
deploymentIdstringbodyYesID of the model the table belongs to. A different ID, including a deployment's, is rejected with 400.

Request

const res = await fetch(
"https://app.limai.io/api/v1/tables/tbl_abc123/rows",
{
  method: "DELETE",
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    fileId: "file_001",
    deploymentId: "dep_001",
  }),
}
);

Response

Response200
{
  "rowsDeleted": 3
}

On this page