Limai Docs
API ReferenceDeployments

Configuration

Get or update deployment configuration including schema, tables, and columns

Get Configuration

GET/api/v1/deployments/{deploymentId}/configuration

Returns the full deployment configuration including extraction schema settings, tables, columns with their labels and units, and shared column IDs.

Parameters

NameTypeInRequiredDescription
deploymentIdstringpathYesThe deployment ID

Request

const res = await fetch(
"https://app.limai.io/api/v1/deployments/dep_abc123/configuration",
{
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
  },
}
);
const config = await res.json();

Response

Response200
{
  "deployment": {
    "id": "dep_abc123",
    "name": "Invoice Extractor",
    "status": "ACTIVE",
    "type": "MODEL"
  },
  "extractionSchema": {
    "id": "es_001",
    "instructions": "Extract invoice fields",
    "writeMode": "INSERT_ROWS",
    "modelName": "LIMAI_STANDARD_1_0",
    "temperature": 1,
    "useExamples": true,
    "numberOfExamples": 1,
    "enableConfidenceScore": false,
    "parsePdf": false,
    "enableBoundingBoxes": false
  },
  "tables": [
    {
      "id": "tbl_001",
      "name": "Primary Table",
      "instructions": null,
      "isPrimary": true,
      "parentTableId": null,
      "wrapColumns": false,
      "columns": [
        {
          "id": "col_001",
          "name": "Invoice Number",
          "type": "TEXT",
          "index": 0,
          "description": "The invoice number",
          "isKey": true,
          "isList": false,
          "labels": [],
          "units": []
        }
      ]
    }
  ],
  "sharedColumnIds": []
}

Update Configuration

PATCH/api/v1/deployments/{deploymentId}/configuration

Update table and column configurations for a deployment. You can update table names, instructions, and column properties in a single request.

Parameters

NameTypeInRequiredDescription
deploymentIdstringpathYesThe deployment ID
tablesarraybodyNoArray of table updates with id and fields to update (name, instructions)
columnsarraybodyNoArray of column updates with id and fields to update (name, description, type, dateFormat, measurementType, isList, isKey, etc.)

Request

const res = await fetch(
"https://app.limai.io/api/v1/deployments/dep_abc123/configuration",
{
  method: "PATCH",
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    tables: [{ id: "tbl_001", name: "Invoices" }],
    columns: [{ id: "col_001", description: "Unique invoice identifier" }],
  }),
}
);

Response

Response200
{
  "success": true,
  "updated": {
    "tables": 1,
    "columns": 1
  },
  "tableIds": [
    "tbl_001"
  ],
  "columnIds": [
    "col_001"
  ]
}