API ReferenceProjects
Workflows
Manage automated workflows within a project
List Workflows
GET
/api/v1/projects/{projectId}/workflowsReturns all workflows in a project with optional status filtering.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
projectId | string | path | Yes | The project ID |
status | string | query | No | Filter by status: ACTIVE, PAUSED, or DISABLED |
Request
const res = await fetch(
"https://app.limai.io/api/v1/projects/proj_abc123/workflows",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);
const workflows = await res.json();Response
Response200
[
{
"id": "wf_001",
"name": "Invoice Processing",
"description": "Process invoices on extraction",
"status": "ACTIVE",
"triggerTypes": [
"DOCUMENT_EXTRACTED"
],
"ingestEmailAddress": null,
"deploymentRoutes": [
{
"deploymentId": "dep_001",
"deploymentName": "Invoice Extractor"
}
],
"executionCount": 42,
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-15T00:00:00.000Z"
}
]Create Workflow
POST
/api/v1/projects/{projectId}/workflowsCreates a new workflow with trigger types and deployment routes.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
projectId | string | path | Yes | The project ID |
name | string | body | Yes | Workflow name (must be unique within project) |
description | string | body | No | Workflow description |
agentPrompt | string | body | Yes | Instructions for the workflow agent |
triggerTypes | string[] | body | Yes | Trigger types: DOCUMENT_EXTRACTED, DOCUMENT_REVIEWED, EMAIL_RECEIVED |
deploymentIds | string[] | body | No | Deployment IDs to route to |
connectionId | string | body | No | Integration connection ID |
Request
const res = await fetch(
"https://app.limai.io/api/v1/projects/proj_abc123/workflows",
{
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Invoice Processing",
agentPrompt: "Process extracted invoice data and validate totals",
triggerTypes: ["DOCUMENT_EXTRACTED"],
deploymentIds: ["dep_001"],
}),
}
);Response
Response201
{
"id": "wf_new",
"name": "Invoice Processing",
"description": null,
"status": "ACTIVE",
"agentPrompt": "Process extracted invoice data and validate totals",
"triggerTypes": [
"DOCUMENT_EXTRACTED"
],
"ingestEmailAddress": null,
"connectionId": null,
"deploymentRoutes": [
{
"deploymentId": "dep_001",
"deploymentName": "Invoice Extractor"
}
],
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}Get Workflow
GET
/api/v1/projects/{projectId}/workflows/{workflowId}Returns detailed information about a specific workflow including its files and execution count.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
projectId | string | path | Yes | The project ID |
workflowId | string | path | Yes | The workflow ID |
Request
const res = await fetch(
"https://app.limai.io/api/v1/projects/proj_abc123/workflows/wf_001",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);
const workflow = await res.json();Response
Response200
{
"id": "wf_001",
"name": "Invoice Processing",
"description": null,
"status": "ACTIVE",
"agentPrompt": "Process extracted invoice data",
"triggerTypes": [
"DOCUMENT_EXTRACTED"
],
"ingestEmailAddress": null,
"connectionId": null,
"connection": null,
"deploymentRoutes": [
{
"deploymentId": "dep_001",
"deploymentName": "Invoice Extractor"
}
],
"files": [],
"executionCount": 42,
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-15T00:00:00.000Z"
}Update Workflow
PATCH
/api/v1/projects/{projectId}/workflows/{workflowId}Update workflow properties including name, prompt, trigger types, deployment routes, and status.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
projectId | string | path | Yes | The project ID |
workflowId | string | path | Yes | The workflow ID |
name | string | body | No | Workflow name |
description | string | body | No | Workflow description |
agentPrompt | string | body | No | Updated agent instructions |
triggerTypes | string[] | body | No | Updated trigger types |
deploymentIds | string[] | body | No | Updated deployment IDs (replaces all existing routes) |
status | string | body | No | Workflow status: ACTIVE, PAUSED, or DISABLED |
Request
const res = await fetch(
"https://app.limai.io/api/v1/projects/proj_abc123/workflows/wf_001",
{
method: "PATCH",
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({ status: "PAUSED" }),
}
);Response
Response200
{
"id": "wf_001",
"name": "Invoice Processing",
"status": "PAUSED",
"updatedAt": "2025-01-15T12:00:00.000Z"
}Delete Workflow
DELETE
/api/v1/projects/{projectId}/workflows/{workflowId}Permanently deletes a workflow.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
projectId | string | path | Yes | The project ID |
workflowId | string | path | Yes | The workflow ID |
Request
const res = await fetch(
"https://app.limai.io/api/v1/projects/proj_abc123/workflows/wf_001",
{
method: "DELETE",
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);Response
Response200
{
"success": true
}