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

Get a system page URL

GET /v1/sites/:id/system-pages/:type/url

Returns the public URL of the page assigned to a system role, for example to link to the cart or the customer account.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionSite ID. List: GET /v1/sites
Parametertype (path) Typestring Requiredyes DescriptionRole: mainpage, catalog, personal, cart, order, payment, compare, feedback. What each one means — System pages
Parameterscope (query) Typestring Requiredno DescriptionInternal landing scope: KNOWLEDGE / GROUP / MAINPAGE. Specify it if the site belongs to the corresponding scope. Otherwise 404 ENTITY_NOT_FOUND is returned. Omit it for an ordinary site

The method accepts no other query parameters: any other one returns 400 INVALID_PARAMS.

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/sites/223/system-pages/personal/url" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

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

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

if (success) {
  console.log('Customer account:', data.url)
} else if (error.message === 'System-page binding not found') {
  console.log('Role not assigned')
} else {
  console.log('Error:', error.code, error.message)
}

JavaScript — OAuth application

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

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

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.url Typestring DescriptionPublic URL of the page assigned to the role

Response example

JSON
{
  "success": true,
  "data": {
    "url": "https://b24-y4xx51.bitrix24site.com/docs-personal/"
  }
}

Error response example

404 — no page is assigned to the role:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "System-page binding not found"
  }
}

Errors

HTTP Code Description
HTTP404 CodeENTITY_NOT_FOUND DescriptionSystem-page binding not found — no page is assigned to the type role. The code is the same as for a site that is not found: tell them apart by error.message
HTTP404 CodeENTITY_NOT_FOUND DescriptionEntity not found or not visible — no site with this ID, the site is not visible to the user, or it belongs to another scope
HTTP400 CodeINVALID_PARAMS DescriptionUnknown system-page type — type is not in the list of roles
HTTP400 CodeINVALID_PARAMS Descriptionid must be a positive safe integer — id is not a positive integer
HTTP400 CodeINVALID_PARAMS DescriptionUnsupported query parameter — a query parameter the method does not accept was passed
HTTP400 CodeINVALID_SCOPE Descriptionscope is not KNOWLEDGE, GROUP or MAINPAGE
HTTP409 CodeLANDING_MODULE_NOT_ENABLED DescriptionThe Sites module is unavailable on this Bitrix24 account. Ask a Bitrix24 account administrator to enable it — until then a retry returns the same refusal
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 returned an invalid URL — Bitrix24 returned the URL in an unexpected form
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the landing scope
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens

Full list of common API errors — Errors.

Known specifics

  • The URL is returned for an unpublished page too. The method does not check publication: the URL matches what GET /v1/pages/:id/public-url returns for the same page, but visitors see the page at that URL only after it is published. Check publication by the active field in the list of site system pages.
  • For the site home page, the domain root is returned. If the role is assigned a page that serves as the home page of the whole site, url is the site domain root, without the page path.
  • The URL is returned for a page in the trash too. Moving a page to the trash does not remove it from the role, and the method keeps returning its URL.

See also