Limai Docs
API ReferenceProjects

Buckets

List and create file storage buckets within a project

List Buckets

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

Returns all buckets in a project.

Parameters

NameTypeInRequiredDescription
projectIdstringpathYesThe project ID

Request

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

Response

Response200
[
  {
    "id": "bkt_001",
    "name": "Raw Invoices",
    "description": "Incoming invoice files",
    "fileCount": 42,
    "createdAt": "2025-01-01T00:00:00.000Z",
    "updatedAt": "2025-01-15T00:00:00.000Z"
  }
]

Create Bucket

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

Creates a new file storage bucket in a project.

Parameters

NameTypeInRequiredDescription
projectIdstringpathYesThe project ID
namestringbodyYesBucket name
descriptionstringbodyNoBucket description

Request

const res = await fetch(
"https://app.limai.io/api/v1/projects/proj_abc123/buckets",
{
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "Raw Invoices",
    description: "Incoming invoice files for processing",
  }),
}
);

Response

Response201
{
  "id": "bkt_new",
  "name": "Raw Invoices",
  "description": "Incoming invoice files for processing",
  "fileCount": 0,
  "createdAt": "2025-01-15T10:30:00.000Z",
  "updatedAt": "2025-01-15T10:30:00.000Z"
}