[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fpages\u002Fpreview":3,"docs-tabs-entities\u002Fpages\u002Fpreview":6},{"content":4,"lastmod":5},"\n## Page preview\n\n`GET \u002Fv1\u002Fpages\u002F:id\u002Fpreview`\n\nReturns the absolute URL of a site page's preview image. The method does not download the image file itself.\n\nRequires the `landing` scope. A read-only key works.\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## Examples\n\n### curl — personal key\n\n```bash\ncurl -X GET \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fpages\u002F3\u002Fpreview\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X GET \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fpages\u002F3\u002Fpreview\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst response = await fetch(\"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fpages\u002F3\u002Fpreview\", {\n  method: \"GET\",\n  headers: {\"X-Api-Key\": \"YOUR_API_KEY\"},\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\u002F3\u002Fpreview\", {\n  method: \"GET\",\n  headers: {\"X-Api-Key\": \"YOUR_APP_KEY\", \"Authorization\": \"Bearer USER_SESSION_TOKEN\"},\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 | Page preview |\n| `data.previewUrl` | string | Absolute URL of the preview image |\n\n## Response example\n\nThe page preview has been generated, and the URL serves the page image:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"previewUrl\": \"https:\u002F\u002Fexample.bitrix24.site\u002Fpreview.jpg\"\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` | `Page or folder not found.` — Bitrix24 did not find the page when the preview was requested |\n| 400 | `INVALID_PAGE_ID` | `id must be a positive safe integer.` — `id` is not a positive integer |\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 return a page URL.` — Bitrix24 did not return a preview URL |\n| 422 | `BITRIX_NO_EFFECT` | `Bitrix24 returned an invalid page URL.` — Bitrix24 returned a URL that is not an `http` or `https` URL, or a URL containing a username and password |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request. The error message 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 to read the page |\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 | `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 limit was exceeded. Retry the request in 1-2 seconds |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 did not respond or responded with 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## Known specifics\n\n- **Until the preview is generated, a placeholder is returned.** In that case the `previewUrl` address serves a placeholder image instead of the page image.\n\n## See also\n\n- [Page public URL](\u002Fdocs\u002Fentities\u002Fpages\u002Fpublic-url)\n- [Get a page](\u002Fdocs\u002Fentities\u002Fpages\u002Fget)\n- [Pages](\u002Fdocs\u002Fentities\u002Fpages)\n","2026-10-21",{},1795415273829]