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

Get a site

GET /v1/sites/:id

Returns a single site by identifier.

Parameters

Parameter Type Required Description
id (path) number yes Site identifier
scope (query) string no Internal landing scope: KNOWLEDGE / GROUP / MAINPAGE. Specify it if the site belongs to the corresponding scope. Otherwise 404 ENTITY_NOT_FOUND is returned. Example: GET /v1/sites/42?scope=KNOWLEDGE

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/sites/157" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/sites/157" \
  -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/157', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log('Site:', data.title, '—', data.type)

JavaScript — OAuth application

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

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

Response fields

The full site object with all fields is returned — see Site fields.

Date format is locale-dependent, not ISO 8601. dateCreate / dateModify arrive as a string in the Bitrix24 account's local format: on the RU locale DD.MM.YYYY HH:MM:SS (30.12.2021 12:30:52), on the EN locale MM/DD/YYYY hh:mm:ss am/pm (04/22/2020 02:39:17 pm). The value is returned as is — new Date(value) yields Invalid Date or swaps the day and month.

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"
  }
}

Error response example

404 — site not found:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "site 999999999 not found"
  }
}

Errors

HTTP Code Description
404 ENTITY_NOT_FOUND A site with this ID was not found or is not accessible to the user
403 SCOPE_DENIED The API key does not have the landing scope
401 TOKEN_MISSING The API key has no configured tokens

The full list of common API errors — Errors.

See also