For AI agents: markdown of this page — /docs-content-en/entities/pages/delete.md documentation index — /llms.txt
Delete a page
DELETE /v1/pages/:id
Deletes a page by identifier. A deleted page cannot be restored via the API — create a new one if needed.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
id (path) |
number | yes | Page identifier |
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/pages/2295" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE "https://vibecode.bitrix24.com/v1/pages/2295" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/pages/2295', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
if (res.status === 204) {
console.log('Page deleted')
}
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/pages/2295', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
if (res.status === 204) {
console.log('Page deleted')
}
Response
On successful deletion an HTTP status 204 No Content is returned with an empty body — success is checked by the status.
Response example
HTTP/1.1 204 No Content
Error response example
404 — the page is not found or already deleted:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Landing not found."
}
}
Errors
| HTTP | error.code |
Description |
|---|---|---|
| 404 | ENTITY_NOT_FOUND |
A page with this ID is not found or already deleted |
| 403 | BITRIX_ACCESS_DENIED |
The user does not have permission to delete this page |
| 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.
Known specifics
Deletion frees up the page code. After deletion the symbolic code is free again — a new page with the same code on the same site can be created immediately.
See also
- List pages — find the ID of the page before deletion, including via
?filter[siteId]=:id - Get a page — check the page before deletion
- Delete a site — deleting a site after clearing its pages
- Batch — bulk deletion of one site's pages
- Limits and optimization — rate limits