
## List knowledge bases

`GET /v1/note/collections`

Returns the knowledge bases available to the current API key in the Bitrix24 account. Supports cursor pagination for traversing large lists.

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. Defaults to 50 |
| `afterPosition` (query) | integer | no | The `position` value from `meta.nextCursor` of the previous response. Pass together with `afterId` |
| `afterId` (query) | integer | no | The `id` value from `meta.nextCursor` of the previous response. Pass together with `afterPosition` |

**Pagination.** Cursor-based. `limit` sets the page size. For the next page, pass `afterPosition` and `afterId` from `meta.nextCursor` of the previous response. When `meta.nextCursor` is `null`, there are no more pages.

## Examples

### curl — personal key

```bash
curl https://vibecode.bitrix24.com/v1/note/collections \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl https://vibecode.bitrix24.com/v1/note/collections \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/note/collections', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data } = await res.json()
console.log('Knowledge bases:', data)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/note/collections', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
const { data } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | array | Array of knowledge bases |
| `data[].id` | number | Knowledge base identifier |
| `data[].name` | string | Knowledge base name |
| `data[].position` | number | Numeric position of the knowledge base |
| `data[].policyLevel` | string | Access policy of the knowledge base. On the Bitrix24 account we checked — `portal` for the shared company knowledge base and `private` for the rest |
| `data[].accessLevel` | string | Access level to the knowledge base. On the knowledge bases we checked — `full` |
| `data[].isArchived` | boolean | `true` for an archived knowledge base |
| `data[].createdBy` | number | Identifier of the employee who created the knowledge base. List: `GET /v1/users` |
| `data[].createdAt` | string | Creation date in ISO 8601 format |
| `data[].updatedBy` | number | Identifier of the employee who last modified the knowledge base. List: `GET /v1/users` |
| `data[].updatedAt` | string | Last modification date in ISO 8601 format |
| `data[].markdownDescription` | string or null | Knowledge base description in Markdown. On the knowledge bases we checked — `null` |
| `meta.nextCursor` | object or null | Next page cursor — an object with `position` and `id` fields. `null` when there are no more pages |

## Response example

```json
{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "My company",
      "position": 1000,
      "policyLevel": "portal",
      "accessLevel": "full",
      "isArchived": false,
      "createdBy": 0,
      "createdAt": "2026-05-21T17:36:10Z",
      "updatedBy": 0,
      "updatedAt": "2026-05-21T17:36:10Z",
      "markdownDescription": null
    },
    {
      "id": 9,
      "name": "Product documentation",
      "position": 100,
      "policyLevel": "private",
      "accessLevel": "full",
      "isArchived": false,
      "createdBy": 1269,
      "createdAt": "2026-06-23T19:01:03Z",
      "updatedBy": 1269,
      "updatedAt": "2026-06-23T19:05:39Z",
      "markdownDescription": null
    },
    {
      "id": 7,
      "name": "KB test",
      "position": 100,
      "policyLevel": "private",
      "accessLevel": "full",
      "isArchived": false,
      "createdBy": 1269,
      "createdAt": "2026-06-22T09:16:33Z",
      "updatedBy": 1269,
      "updatedAt": "2026-06-22T09:16:33Z",
      "markdownDescription": null
    }
  ],
  "meta": { "nextCursor": null }
}
```

## Error response example

400 — invalid `limit`:

```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 the range from 1 to 200, or only one of `afterPosition` / `afterId` was passed |
| 403 | `SCOPE_DENIED` | The key lacks the `note` scope |
| 401 | `TOKEN_MISSING` | The key has no configured tokens |

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

## Known specifics

**Archived knowledge bases are not listed.** After [archiving](./archive.md), a knowledge base disappears from the results but stays available by identifier via [`GET /v1/note/collections/:id`](./get.md) — its response carries `isArchived: true`.

## See also

- [Get a knowledge base](/docs/note/collections/get)
- [Document tree](/docs/note/collections/tree)
- [Knowledge bases](/docs/note/collections)
- [Limits and optimization](/docs/optimization)
