Limai Docs
API ReferenceProjects

Deployments

List and create deployments within a project

List Deployments

GET/api/v1/projects/{projectId}/deployments

Returns all deployments in a project with optional status and type filtering.

Parameters

NameTypeInRequiredDescription
projectIdstringpathYesThe project ID
statusstringqueryNoFilter by status: ACTIVE or PAUSED
typestringqueryNoFilter by type: PRODUCTION or MODEL

Request

const res = await fetch(
"https://app.limai.io/api/v1/projects/proj_abc123/deployments?status=ACTIVE",
{
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
  },
}
);
const { data } = await res.json();

Response

Response200
{
  "data": [
    {
      "id": "dep_001",
      "name": "Invoice Extractor v2",
      "status": "ACTIVE",
      "type": "MODEL",
      "extractionSchemaId": "es_001",
      "fileCount": 150,
      "tableCount": 2,
      "createdAt": "2025-01-01T00:00:00.000Z",
      "updatedAt": "2025-01-15T00:00:00.000Z"
    }
  ]
}

Create Deployment

POST/api/v1/projects/{projectId}/deployments

Creates a new deployment in a project. For MODEL deployments, you can optionally provide table and column definitions. If no tables are provided, a default primary table is created.

Parameters

NameTypeInRequiredDescription
projectIdstringpathYesThe project ID
namestringbodyYesDeployment name
typestringbodyNoDeployment type: MODEL or PRODUCTION(default: MODEL)
tablesarraybodyNoArray of table definitions with columns

Request

const res = await fetch(
"https://app.limai.io/api/v1/projects/proj_abc123/deployments",
{
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "Invoice Extractor",
    type: "MODEL",
    tables: [
      {
        name: "Invoices",
        columns: [
          { name: "Invoice Number", type: "TEXT", isKey: true },
          { name: "Date", type: "DATE" },
          { name: "Total", type: "NUMBER" },
        ],
      },
    ],
  }),
}
);

Response

Response201
{
  "id": "dep_new",
  "name": "Invoice Extractor",
  "status": "ACTIVE",
  "type": "MODEL",
  "extractionSchemaId": "es_new",
  "createdAt": "2025-01-15T10:30:00.000Z",
  "tables": [
    {
      "id": "tbl_001",
      "name": "Invoices",
      "isPrimary": true,
      "columns": [
        {
          "id": "col_001",
          "name": "Invoice Number",
          "type": "TEXT",
          "description": null
        }
      ]
    }
  ]
}