For AI agents: markdown of this page — /docs-content-en/entities/sites/list.md documentation index — /llms.txt

List sites

GET /v1/sites

Returns a list of sites in your Bitrix24 account with filtering and auto-pagination support. By default only non-deleted sites are returned — to retrieve sites from the recycle bin, pass filter[deleted]=Y.

Parameters

Parameter Type Default Description
Parameterlimit (query) Typenumber Default50 DescriptionNumber of records (up to 5000)
Parameteroffset (query) Typenumber Default0 DescriptionSkip N records
Parameterselect (query) Typestring Default— DescriptionFields to return, from GET /v1/sites/fields: ?select=id,title,type
Parameterfilter (query) Typeobject Default— DescriptionFiltering by the fields from GET /v1/sites/fields.
Filtering syntax. Example: ?filter[type]=PAGE
Parametersort (query) Typestring Default— DescriptionComma-separated sort fields from GET /v1/sites/fields. A minus before a name means descending: ?sort=-id, ?sort=title,-id. Without sort and order, results are sorted by ascending id. An unknown field name returns 422 BITRIX_ERROR
Parameterorder (query) Typeobject | string Default— DescriptionSorting in object form: ?order[id]=desc. The direction is asc, desc, ASC, or DESC. Any other value returns 400 INVALID_SORT_DIRECTION. Applied only when sort is not passed. The short form order=desc works only together with sort: ?sort=id&order=desc switches the fields listed in sort from ascending to descending. Without sort, the short form is ignored
Parameterscope (query) Typestring Default— DescriptionInternal landing area. Allowed values: KNOWLEDGE (knowledge base), GROUP (workgroup pages), MAINPAGE (home pages). Without the parameter, regular landing sites are returned. Accepted as ?scope=KNOWLEDGE or ?filter[scope]=KNOWLEDGE — both forms produce the same request to Bitrix24

Type filter and area (scope). Bitrix24 binds filter[type] to the current area: the default area exposes only PAGE / STORE / SMN / VIBE. If you pass filter[type]=KNOWLEDGE or filter[type]=GROUP and do not pass scope, Vibecode supplies the matching area itself (type=KNOWLEDGE → scope=KNOWLEDGE) — filtering by knowledge bases and group pages works without setting scope manually. An explicit scope always wins. If the type is given as a list or an operator (?filter[type][]=KNOWLEDGE&filter[type][]=PAGE), where a single area cannot be chosen, meta.warnings carries a hint with the code TYPE_REQUIRES_SCOPE. MAINPAGE is an area, not a site type (its sites have type VIBE), so it is not derived from the type filter: pass scope=MAINPAGE explicitly for home pages.

Examples

curl — personal key

Terminal
curl -g "https://vibecode.bitrix24.com/v1/sites?limit=10&filter[type]=PAGE" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -g "https://vibecode.bitrix24.com/v1/sites?limit=10&filter[type]=PAGE" \
  -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/sites?limit=10&filter[type]=PAGE', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

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

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/sites?limit=10&filter[type]=PAGE', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

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

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typearray DescriptionArray of sites. All item fields — Site fields
Fieldmeta.total Typenumber DescriptionTotal number of records matching the filter
Fieldmeta.hasMore Typeboolean DescriptionWhether there are more records beyond limit
Fieldmeta.warnings Typearray DescriptionHints about how the request was applied. Present when the type filter is given as a list or an operator — code TYPE_REQUIRES_SCOPE

The URL of any site from the data array is built from its id:

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

<portal> is the Bitrix24 portal domain. Access is restricted by the employee's permissions in Bitrix24.

Response example

JSON
{
  "success": true,
  "data": [
    {
      "id": 157,
      "title": "Promo landing",
      "code": "/promo/",
      "type": "PAGE",
      "active": true,
      "domainId": 5,
      "createdById": 1,
      "dateCreate": "12.09.2024 10:23:14",
      "dateModify": "04.11.2025 08:51:20"
    },
    {
      "id": 3,
      "title": "Services catalog",
      "code": "/services/",
      "type": "PAGE",
      "active": true,
      "domainId": 5,
      "createdById": 1,
      "dateCreate": "22.04.2020 14:39:17",
      "dateModify": "06.05.2024 15:43:34"
    }
  ],
  "meta": {
    "total": 25,
    "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
HTTP400 CodeINVALID_SORT_DIRECTION DescriptionThe direction in order is not asc, desc, ASC, or DESC
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 returned an error — the text is in error.message. For example, sorting by an unknown field
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the landing scope
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens
HTTP409 CodeLANDING_MODULE_NOT_ENABLED DescriptionThe Sites module is unavailable on this Bitrix24 account. Ask a Bitrix24 account administrator to enable it — until it is enabled, retrying the request returns the same error
HTTP429 CodeRATE_LIMITED DescriptionRate limit exceeded: 300 requests per minute per portal. All API keys of the portal share one limit. The current limit is returned in the x-ratelimit-limit header. Retry after the delay in the Retry-After header

For the full list of common API errors, see Errors.

Known specifics

Visibility by user permissions. Only sites for which the API key owner has the "view" permission appear in the list. If your Bitrix24 account has sites but the response is empty, check the permissions of the user the key was issued for.

Recycle bin. To retrieve deleted sites, pass filter[deleted]=Y. Allowed values: Y or N.

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.

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

See also