> ## 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="page" type="number" default="1">
  Page number
</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": 20,
    "total": 5,
    "lastKey": "eyJwayI6Ik9SR..."
  }
}
```

## Code Examples

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

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

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