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

Remove all site system pages

DELETE /v1/sites/:id/system-pages

Frees all system roles of the site in one call. The pages that were assigned to them stay on the site.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionSite ID. List: GET /v1/sites
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

No request body is needed: a body with any field returns 400 INVALID_PARAMS.

Examples

curl — personal key

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

curl — OAuth application

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

const { success, data } = await res.json()
console.log('Roles removed:', success && data.length === 0)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/sites/223/system-pages', {
  method: 'DELETE',
  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 Typearray DescriptionThe site's bindings after removal. Always an empty array on success. The element format — type, pageId, title, deleted, active — is described in List site system pages

Response example

JSON
{
  "success": true,
  "data": []
}

Error response example

404 — a site with this ID was not found:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Entity not found or not visible"
  }
}

Errors

HTTP Code Description
HTTP404 CodeENTITY_NOT_FOUND DescriptionA site with this ID was not found, is not accessible to the user or belongs to another scope: the wrong scope was sent
HTTP400 CodeINVALID_PARAMS Descriptionid must be a positive safe integer — id is not a positive integer
HTTP400 CodeINVALID_PARAMS DescriptionUnsupported body field — the body contains a field the method does not accept
HTTP400 CodeINVALID_PARAMS DescriptionBody must be a JSON object — the body is not a JSON object, for example an array was sent
HTTP400 CodeINVALID_PARAMS DescriptionUnsupported query parameter — a query parameter the method does not accept was sent
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 did not save the binding change; site settings permission may be missing — the site still has bindings after the write. Check whether the user has permission to change site settings
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 did not confirm the binding change — Bitrix24 did not confirm the write
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 returned invalid system pages — Bitrix24 returned the list of bindings in an unexpected shape
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is read-only. The request is refused before any call to the Bitrix24 account
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

  • Repeated removal is safe. A call on a site without bindings returns 200 with an empty data array, unlike removing a single role, which returns 404 for an unassigned role.

See also