
## List pages

`GET /v1/pages`

Returns a list of landing and online-store pages with support for filtering and auto-pagination. By default only non-deleted pages are returned.

## Parameters

| Parameter | Type | Default | Description |
|----------|-----|-----------|---------|
| `limit` | number | `50` | Number of records (up to 5000) |
| `offset` | number | `0` | Skip N records |
| `select` | string | — | Field selection: `?select=id,title,code,siteId,active`. Without `select` the response contains the full set of page fields in camelCase (as in the card) |
| `filter` | object | — | Filtering by the page's key fields.<br>[Filtering syntax](/docs/filtering). Example: `?filter[siteId]=3`. The boolean `active` is accepted as `true`/`false`, `1`/`0`, or `Y`/`N` |
| `scope` | string | — | Internal landing area. Allowed values: `KNOWLEDGE` (knowledge base pages), `GROUP` (workgroup pages), `MAINPAGE` (main pages). Without the parameter, pages of regular landing sites are returned. Accepted as `?scope=KNOWLEDGE` or `?filter[scope]=KNOWLEDGE` — both forms produce the same request to Bitrix24 |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/pages?filter[siteId]=3&limit=10&select=id,title,code,siteId,active,dateCreate,dateModify" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/pages?filter[siteId]=3&limit=10&select=id,title,code,siteId,active,dateCreate,dateModify" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const params = new URLSearchParams({
  'filter[siteId]': '3',
  limit: '10',
  select: 'id,title,code,siteId,active,dateCreate,dateModify',
})

const res = await fetch(`https://vibecode.bitrix24.com/v1/pages?${params}`, {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data, meta } = await res.json()
console.log(`Found ${meta.total} pages`)
```

### JavaScript — OAuth application

```javascript
const params = new URLSearchParams({
  'filter[siteId]': '3',
  limit: '10',
  select: 'id,title,code,siteId,active,dateCreate,dateModify',
})

const res = await fetch(`https://vibecode.bitrix24.com/v1/pages?${params}`, {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data, meta } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | array | Array of pages |
| `data[].id` | number | Page identifier |
| `data[].title` | string | Page title |
| `data[].code` | string | Symbolic code of the page |
| `data[].siteId` | number | Site identifier |
| `data[].active` | boolean | Whether the page is active |
| `data[].description` | string \| null | Arbitrary description |
| `data[].createdById` | number | Identifier of the employee who created it |
| `data[].dateCreate` | datetime | Creation date |
| `data[].dateModify` | datetime | Last modification date |
| `meta.total` | number | Total number of records matching the filter |
| `meta.hasMore` | boolean | Whether there are more records beyond `limit` |

The URL of any page from the `data` array is built from its `id` and `siteId`:

```
https://<portal>.bitrix24.com/sites/site/<siteId>/view/<id>/
```

`<siteId>` — ID of the site the page belongs to (the `siteId` field of each item). `<portal>` — the Bitrix24 account domain. Access is restricted by the employee's permissions in Bitrix24.

## Response example

```json
{
  "success": true,
  "data": [
    {
      "id": 9,
      "title": "Page migration test",
      "code": "change1",
      "siteId": 3,
      "active": true,
      "description": null,
      "createdById": 1,
      "dateCreate": "26.05.2020 17:24:02",
      "dateModify": "10.10.2022 15:25:30"
    },
    {
      "id": 7,
      "title": "Test page",
      "code": "test",
      "siteId": 3,
      "active": true,
      "description": null,
      "createdById": 1,
      "dateCreate": "25.05.2020 17:34:17",
      "dateModify": "10.10.2022 15:25:30"
    }
  ],
  "meta": {
    "total": 13,
    "hasMore": true
  }
}
```

## Error response example

403 — no scope:

```json
{
  "success": false,
  "error": {
    "code": "SCOPE_DENIED",
    "message": "This endpoint requires 'landing' scope"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 422 | `BITRIX_ERROR` | Bitrix24 returned an error — see `error.message` |
| 403 | `SCOPE_DENIED` | The API key does not have the `landing` scope |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |

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

## Known specifics

**Pagination via `offset` is supported.** Vibecode returns the requested `[offset, offset + limit)` window. The `meta.total` value is the exact number of records matching the filter, and `meta.hasMore` shows whether there are records beyond the window.

**Sorting.** Supported via `?order[field]=asc|desc` or the short form `?sort=-field` (descending). Without the parameter the selection is ordered by ascending `id`.

**Knowledge base and other internal areas.** The `scope` parameter switches the source: `KNOWLEDGE` — knowledge base pages, `GROUP` — workgroup pages, `MAINPAGE` — main pages. Without the parameter, pages of regular landing sites are returned (the default source). Example: `GET /v1/pages?scope=KNOWLEDGE` returns knowledge base pages.

## See also

- [Get a page](/docs/entities/pages/get) — data of a single page by ID
- [Search pages](/docs/entities/pages/search) — POST counterpart for complex filters
- [Create a page](/docs/entities/pages/create) — create a new page
- [Update a page](/docs/entities/pages/update) — change fields
- [Delete a page](/docs/entities/pages/delete) — delete by ID
- [Sites](/docs/entities/sites) — parent containers of pages
- [Filtering syntax](/docs/filtering)
- [Entity API](/docs/entity-api) — select, pagination
- [Batch](/docs/batch) — combining several list requests
- [Limits and optimization](/docs/optimization) — rate limits
