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

# List Knowledge

> Browse the documents in a knowledge collection

## Overview

Lists the documents in a collection, newest first. To get the next page, pass the oldest document's `created_at` as `before`. A page shorter than `limit` means there are no more.

Operation name: `knowledge.list`.

## Authorization

**x-api-key** `string` *required*

Your Composer API key

## Headers

**Content-Type** `string` *required*

Must be set to application/json

## Body

**collection** `string`

The collection to list. Default `semantic`.

**limit** `integer`

How many documents to return, 1–200. Default 30.

```json Example theme={null}
"limit": 30
```

**before** `string`

Only documents created before this time (RFC 3339). Use it to page.

**after** `string`

Only documents created at or after this time (RFC 3339).

```json Example Request theme={null}
{
  "limit": 30
}
```

***

## Response

**collection** `string`

The collection listed.

**documents** `array`

Each has `id`, `title`, `doc_type`, `subject_id`, `metadata`, `created_at`, `withdrawn_at` and `chunks`. A withdrawn document has `withdrawn_at` set and no chunks.

```json Example Success Response theme={null}
{
  "collection": "semantic",
  "documents": [
    {
      "id": "c41d2e7a-6b5f-4a3e-8d9c-0b1a2f3e4d5c",
      "title": "Autumn menu",
      "doc_type": "prose",
      "subject_id": null,
      "metadata": {},
      "created_at": "2026-11-27T10:00:00Z",
      "withdrawn_at": null,
      "chunks": 6
    }
  ]
}
```

***

## Example cURL

```bash cURL theme={null}
curl --request POST 'https://composer.personal.ai/lab/api/v1/op/knowledge.list' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{"limit": 30}'
```

***

## Error Codes

| Code | Description |
| - | - |
| 400 | The body doesn't match the fields above, or the operation failed. The response body says why. |
| 401 | Missing or invalid API key |
| 403 | This key isn't allowed to call this operation |


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