> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metabind.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Collections

> Retrieve all collections for a project

## Path Parameters

<ParamField path="organizationId" type="string" required>
  Organization ID
</ParamField>

<ParamField path="projectId" type="string" required>
  Project ID
</ParamField>

## Query Parameters

<ParamField query="lastKey" type="string">
  Cursor for pagination (from previous response)
</ParamField>

<ParamField query="limit" type="number" default="20">
  Items per page
</ParamField>

<ParamField query="folderId" type="string">
  Filter by folder (null for root level)
</ParamField>

## Response

<ResponseField name="data" type="Collection[]">
  Array of collection objects
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination information
</ResponseField>

### Example Response

```json theme={null}
{
  "data": [
    {
      "id": "coll123",
      "name": "UI Components",
      "folderId": null,
      "createdAt": "2024-03-20T10:00:00Z",
      "updatedAt": "2024-03-20T10:00:00Z"
    },
    {
      "id": "coll124",
      "name": "Layout Components",
      "folderId": null,
      "createdAt": "2024-03-21T10:00:00Z",
      "updatedAt": "2024-03-21T10:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 2,
    "total": 2,
    "lastKey": "eyJwayI6Ik9SR..."
  }
}
```

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/collections?limit=2" \
    -H "Authorization: Bearer YOUR_JWT"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/collections?limit=2',
    {
      headers: {
        'Authorization': 'Bearer YOUR_JWT'
      }
    }
  );

  const { data: collections, pagination } = await response.json();
  console.log(`Found ${collections.length} collections on this page`);
  ```
</CodeGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.