[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fpages\u002Fcopy":3,"docs-tabs-entities\u002Fpages\u002Fcopy":6},{"content":4,"lastmod":5},"## Copy a page\n\n`POST \u002Fv1\u002Fpages\u002F:id\u002Fcopy`\n\nCreates a copy of a page together with its blocks. A page in the trash can be copied too. A copy of an active page may be published right away, subject to the plan limits. The destination folder is checked before the copy is created.\n\nRequires the `landing` scope.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `id` (path) | number | yes | Page ID. List: [`GET \u002Fv1\u002Fpages`](\u002Fdocs\u002Fentities\u002Fpages\u002Flist) |\n| `scope` (query) | string | no | Site type: `KNOWLEDGE` — knowledge base, `GROUP` — workgroup site, `MAINPAGE` — main page. Omit the parameter for pages of all other sites |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|----------|\n| `toSiteId` | number | no | Target site ID. List: [`GET \u002Fv1\u002Fsites`](\u002Fdocs\u002Fentities\u002Fsites\u002Flist) |\n| `toFolderId` | number \\| null | no | Folder ID on the target site, or on the page's own site when `toSiteId` is omitted. List: [`GET \u002Fv1\u002Fsites\u002F:id\u002Ffolders`](\u002Fdocs\u002Fentities\u002Fsites\u002Ffolders\u002Flist). `null` or `0` — site root |\n| `skipSystem` | boolean | no | Do not copy the system page flag. Defaults to `false` |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fpages\u002F2427\u002Fcopy\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fpages\u002F2427\u002Fcopy\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst response = await fetch(\"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fpages\u002F2427\u002Fcopy\", {\n  method: \"POST\",\n  headers: {\"X-Api-Key\": \"YOUR_API_KEY\", \"Content-Type\": \"application\u002Fjson\"},\n  body: JSON.stringify({}),\n})\nconst result = await response.json()\nif (!response.ok) throw new Error(result.error.message)\nconsole.log(result.data)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst response = await fetch(\"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fpages\u002F2427\u002Fcopy\", {\n  method: \"POST\",\n  headers: {\"X-Api-Key\": \"YOUR_APP_KEY\", \"Authorization\": \"Bearer USER_SESSION_TOKEN\", \"Content-Type\": \"application\u002Fjson\"},\n  body: JSON.stringify({}),\n})\nconst result = await response.json()\nif (!response.ok) throw new Error(result.error.message)\nconsole.log(result.data)\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | Always `true` on success |\n| `data` | object | The page after the action |\n| `data.id` | number | Page ID |\n| `data.siteId` | number | ID of the page's site |\n| `data.folderId` | number \\| null | Folder ID. `null` — the page is in the site root |\n| `data.title` | string | Page title |\n| `data.code` | string | Page code in the URL |\n| `data.active` | boolean | Whether the page is published |\n| `data.deleted` | string | `Y` — the page is in the trash, `N` — it is not |\n\n## Response example\n\nCopy created, HTTP status `201 Created`:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 2429,\n    \"siteId\": 3,\n    \"folderId\": null,\n    \"title\": \"Empty page copy\",\n    \"code\": \"empty-page-copy\",\n    \"active\": false,\n    \"deleted\": \"N\"\n  }\n}\n```\n\n## Error response example\n\n404 — no page with this `id`:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Page not found.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 404 | `ENTITY_NOT_FOUND` | `Page not found.` — no page with this `id` |\n| 404 | `ENTITY_NOT_FOUND` | `Site not found.` — site `toSiteId` does not exist |\n| 404 | `ENTITY_NOT_FOUND` | `Folder not found in the destination site.` — folder `toFolderId` does not exist on the target site |\n| 404 | `ENTITY_NOT_FOUND` | `Page or folder not found.` — Bitrix24 did not find the page or folder while performing the action |\n| 400 | `INVALID_PAGE_ID` | `id must be a positive safe integer.` — `id` is not a positive integer |\n| 400 | `INVALID_PARAMS` | `Body must be a JSON object.` — the body is not a JSON object |\n| 400 | `INVALID_PARAMS` | `Body contains a field this operation does not accept.` — the body contains a field that is not in the request fields table |\n| 400 | `INVALID_PARAMS` | `toSiteId must be a positive safe integer.` — `toSiteId` is not a positive integer |\n| 400 | `INVALID_PARAMS` | `toFolderId must be a positive safe integer or null for the root.` — `toFolderId` is not a positive integer, `null` or `0` |\n| 400 | `INVALID_PARAMS` | `skipSystem must be boolean.` — `skipSystem` is not `true` or `false` |\n| 400 | `INVALID_SCOPE` | `scope must be KNOWLEDGE, GROUP or MAINPAGE, or omitted.` — `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |\n| 422 | `BITRIX_NO_EFFECT` | `Bitrix24 did not confirm the page action.` — Bitrix24 did not confirm the action |\n| 422 | `BITRIX_NO_EFFECT` | `Bitrix24 did not return the page after the action.` — the page could not be read after the action |\n| 422 | `BITRIX_NO_EFFECT` | `Bitrix24 did not persist the requested page state.` — the copy did not end up on the target site or in the target folder |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the action. The error text comes from Bitrix24 |\n| 403 | `SCOPE_DENIED` | The API key does not have the `landing` scope |\n| 403 | `BITRIX_ACCESS_DENIED` | The Bitrix24 user the key was issued for has no permission for the page action |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only. The request is refused before any call to Bitrix24 |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 401 | `INVALID_API_KEY` | The key in `X-Api-Key` was not found or has been revoked |\n| 409 | `LANDING_MODULE_NOT_ENABLED` | The Sites module is unavailable on the Bitrix24 account. Returned when the body contains `toSiteId` |\n| 409 | `PORTAL_ADDRESS_CHANGED` | The on-premise Bitrix24 moved to a new address, but the key's webhook was issued for the old one. Reissue the key's webhook |\n| 429 | `RATE_LIMITED` | The Bitrix24 request rate limit was exceeded. Retry the request in 1-2 seconds |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 did not respond or returned a server error |\n| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond within the allotted time |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Move a page](\u002Fdocs\u002Fentities\u002Fpages\u002Fmove)\n- [List folders](\u002Fdocs\u002Fentities\u002Fsites\u002Ffolders\u002Flist)\n- [Get a page](\u002Fdocs\u002Fentities\u002Fpages\u002Fget)\n- [Pages](\u002Fdocs\u002Fentities\u002Fpages)\n","2026-10-21",{},1795376957351]