
## List documents

`GET /v1/note/documents`

Returns a flat list of accessible documents, paginated with a continuation cursor. To traverse a large knowledge base in full, use this method: the document tree of a single knowledge base is not paginated.

The generic `filter` parameter is not applied by this endpoint. By default, the API preserves the previous HTTP 200 response and data, adds `Warning: 299 - "filter is not supported on this endpoint and was ignored"`, and records unsupported-filter use in the server log.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `limit` (query) | integer | no | Page size, from 1 to 200 |
| `afterCursor` (query) | string | no | The previous response's `meta.nextCursor` object as URL-encoded JSON. Fields: `stream`, `collectionId`, `id` |

Pass the cursor fields unchanged. `collectionId` may be `null`. Stop the traversal only when `meta.nextCursor` is `null`: an empty `data` array with a non-null cursor means you must request the next page.

## Examples

### curl — personal key

```bash
curl -G https://vibecode.bitrix24.com/v1/note/documents \
  --data-urlencode "limit=20" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl -G https://vibecode.bitrix24.com/v1/note/documents \
  --data-urlencode "limit=20" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
let cursor = null
do {
  const params = new URLSearchParams({ limit: '20' })
  if (cursor) params.set('afterCursor', JSON.stringify(cursor))
  const res = await fetch(`https://vibecode.bitrix24.com/v1/note/documents?${params}`, {
    headers: { 'X-Api-Key': 'YOUR_API_KEY' },
  })
  if (!res.ok) throw new Error(`HTTP ${res.status}`)
  const { data, meta } = await res.json()
  for (const document of data) console.log(document.id)
  cursor = meta.nextCursor
} while (cursor !== null)
```

### JavaScript — OAuth application

```javascript
let cursor = null
do {
  const params = new URLSearchParams({ limit: '20' })
  if (cursor) params.set('afterCursor', JSON.stringify(cursor))
  const res = await fetch(`https://vibecode.bitrix24.com/v1/note/documents?${params}`, {
    headers: {
      'X-Api-Key': 'YOUR_APP_KEY',
      'Authorization': 'Bearer USER_SESSION_TOKEN',
    },
  })
  if (!res.ok) throw new Error(`HTTP ${res.status}`)
  const { data, meta } = await res.json()
  for (const document of data) console.log(document.id)
  cursor = meta.nextCursor
} while (cursor !== null)
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | array | Documents on this page. The array may be empty while `meta.nextCursor` is not `null` |
| `data[].id` | number | Document identifier |
| `data[].collectionId` | number | The knowledge base the document belongs to. List: [`GET /v1/note/collections`](/docs/note/collections/list) |
| `data[].parentId` | number or null | Parent document in the knowledge base tree. `null` for a top-level document |
| `data[].title` | string | Document title |
| `data[].position` | number | Sort order among sibling documents |
| `data[].createdBy` | number | Creator identifier. List: [`GET /v1/users`](/docs/entities/users/list) |
| `data[].updatedBy` | number | Identifier of the last editor. List: [`GET /v1/users`](/docs/entities/users/list) |
| `data[].createdAt` | string | Creation date in ISO 8601 format |
| `data[].updatedAt` | string | Last modification date in ISO 8601 format |
| `data[].contentUpdatedAt` | string or null | Date of the last content change in ISO 8601 format, or `null`. A title-only edit does not change it |
| `data[].state` | string | Document state. `live` for an active document |
| `data[].isArchived` | boolean | `true` for an archived document |
| `data[].isTrashed` | boolean | `true` for a document in the trash |
| `data[].isOrphan` | boolean | `true` for a document that belongs to no knowledge base |
| `meta.nextCursor` | object or null | Next-page cursor `{ stream, collectionId, id }`, or `null` at the end |

## Response example

A page of two documents with a continuation cursor:

```json
{
  "success": true,
  "data": [
    {
      "id": 11,
      "collectionId": 9,
      "parentId": null,
      "title": "Chapter 1",
      "position": 1000,
      "createdBy": 1269,
      "updatedBy": 1269,
      "createdAt": "2026-06-23T22:07:29+00:00",
      "updatedAt": "2026-06-23T22:07:29+00:00",
      "contentUpdatedAt": null,
      "state": "live",
      "isArchived": false,
      "isTrashed": false,
      "isOrphan": false
    },
    {
      "id": 5,
      "collectionId": 7,
      "parentId": null,
      "title": "Chapter 1 (updated)",
      "position": 1000,
      "createdBy": 1269,
      "updatedBy": 1269,
      "createdAt": "2026-06-22T12:17:40+00:00",
      "updatedAt": "2026-07-06T12:03:47+00:00",
      "contentUpdatedAt": null,
      "state": "live",
      "isArchived": false,
      "isTrashed": false,
      "isOrphan": false
    }
  ],
  "meta": {
    "nextCursor": { "stream": "collections", "collectionId": 7, "id": 5 }
  }
}
```

## Error response example

400 — `limit` is outside the range from 1 to 200:

```json
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "`limit` must be an integer between 1 and 200"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 200 | `Warning: 299` | The filter is ignored by default; previous data is preserved and the warning is sent in the `Warning` header. |
| 400 (strict mode only) | `UNSUPPORTED_FILTER` | The server mode is disabled by default; until it is enabled, the endpoint preserves HTTP 200 and the previous data. |
| 400 | `INVALID_PARAMS` | `limit` outside 1…200 or malformed `afterCursor` |
| 403 | `SCOPE_DENIED` | The key lacks the `note` scope |
| 401 | `TOKEN_MISSING` | The API key has no tokens configured |

Full list of common API errors — [Errors](/docs/errors).

## See also

- [Search documents](/docs/note/documents/search)
- [Document tree](/docs/note/collections/tree)
- [Documents](/docs/note/documents)
