API ReferenceDeployments
Documents
List and manage documents in a deployment
List Documents
GET
/api/v1/deployments/{deploymentId}/documentsReturns a paginated list of documents in a deployment, with optional status filtering.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
deploymentId | string | path | Yes | The deployment ID |
limit | integer | query | No | Results per page (1-500)(default: 50) |
offset | integer | query | No | Number of results to skip(default: 0) |
status | string | query | No | Filter by file status (e.g. UPLOADED, PROCESSING, EXTRACTED, FAILED) |
Request
const res = await fetch(
"https://app.limai.io/api/v1/deployments/dep_abc123/documents?limit=20&status=EXTRACTED",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);
const { data, pagination } = await res.json();Response
Response200
{
"data": [
{
"id": "file_001",
"name": "invoice_2025.pdf",
"originalExtension": "pdf",
"status": "EXTRACTED",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:31:00.000Z",
"confidenceScore": 0.92,
"validationFailCount": 0,
"inExamplePool": false
}
],
"pagination": {
"total": 42,
"limit": 20,
"offset": 0
}
}Bulk Delete Documents
POST
/api/v1/deployments/{deploymentId}/documents/bulk-deleteBULKDelete multiple documents and their associated rows from a deployment in a single request. Supports up to 500 file IDs per request.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
deploymentId | string | path | Yes | The deployment ID |
fileIds | string[] | body | Yes | Array of file IDs to delete (1-500) |
Request
const res = await fetch(
"https://app.limai.io/api/v1/deployments/dep_abc123/documents/bulk-delete",
{
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
fileIds: ["file_001", "file_002", "file_003"],
}),
}
);Response
Response200
{
"deletedCount": 2,
"notFoundFileIds": [
"file_003"
],
"summary": {
"deleted": 2,
"not_found": 1,
"total": 3
}
}