[{"data":1,"prerenderedAt":8},["ShallowReactive",2],{"docs-entities\u002Fpage-templates":3,"docs-tabs-entities\u002Fpage-templates":6},{"content":4,"lastmod":5},"# Page templates\n\nReady-made templates used to create a site page: a blank page, a page from a set, or a template from an application. The list depends on the site type, and the template code is passed when you create a page from a template.\n\nBitrix24 API: `landing.demos.getPageList`\nScope: `landing`\n\n## Operations\n\n- [List page templates](.\u002Fpage-templates\u002Flist.md) — `GET \u002Fv1\u002Fpage-templates`\n\n## Key fields\n\n| Field | Description |\n|------|----------|\n| `code` | Template code. Passed in the `templateCode` field when [creating a page from a template](\u002Fdocs\u002Fentities\u002Fpages\u002Ffrom-template) |\n| `title` | Template name in the language of the Bitrix24 account |\n| `siteType` | Site type the template is intended for: `PAGE`, `KNOWLEDGE`, `GROUP` |\n| `available` | Whether a page can be created from this template |\n| `appCode` | Code of the application that added the template. Absent for templates without an application |\n\nAll response fields are described on the [List page templates](.\u002Fpage-templates\u002Flist.md) page.\n\n## What to know before you start\n\n1. **The list depends on the site type.** The `siteType` parameter selects the template set: `page` — landing page, `knowledge` — knowledge base, `group` — group knowledge base. Without the parameter, landing page templates are returned.\n2. **A template code works only for a site of its own type.** A template returned for `knowledge` does not create a page on a landing page site. The site type is in the `type` field of the [site](\u002Fdocs\u002Fentities\u002Fsites\u002Fget).\n3. **The template kind is visible from the code.** A code without `\u002F` or `@` is a standalone template, for example `empty` or `search-result`. A code with `\u002F` is a page from a set, for example `wiki-dark\u002Fmain`. A code with `@` is a template from an application, where the part before `@` matches `appCode`.\n4. **A page template is not a layout template.** A page template provides a ready-made design with blocks. The areas around the content — header, footer, side columns — are defined by [layout templates](\u002Fdocs\u002Fentities\u002Fsite-templates).\n\n## Typical scenario\n\n1. Find the site and its type: [`GET \u002Fv1\u002Fsites`](\u002Fdocs\u002Fentities\u002Fsites\u002Flist).\n2. Get the templates for that type: [`GET \u002Fv1\u002Fpage-templates?siteType=page`](.\u002Fpage-templates\u002Flist.md).\n3. Create a page from the template code: [`POST \u002Fv1\u002Fpages\u002Ffrom-template`](\u002Fdocs\u002Fentities\u002Fpages\u002Ffrom-template) with `siteId` and `templateCode`.\n\n## Limits\n\n| Limit | Value |\n|-------|----------|\n| Records per call | the full list of templates, without pagination |\n| Rate limit | shared across the Vibecode API — see [Limits and optimization](\u002Fdocs\u002Foptimization) |\n\n## See also\n\n- [Create a page from a template](\u002Fdocs\u002Fentities\u002Fpages\u002Ffrom-template)\n- [Pages](\u002Fdocs\u002Fentities\u002Fpages)\n- [Sites](\u002Fdocs\u002Fentities\u002Fsites)\n- [Layout templates](\u002Fdocs\u002Fentities\u002Fsite-templates)\n","2026-10-16",{"page-templates\u002Flist.md":7},"## List page templates\n\n`GET \u002Fv1\u002Fpage-templates`\n\nReturns the templates used to create a site page. Pass the template code when you create a page from a template.\n\n## Parameters\n\n| Parameter | Type | Required | Default | Description |\n|----------|-----|:-----:|-----------|----------|\n| `siteType` (query) | string | no | `page` | Site type to return templates for: `page` — landing page, `knowledge` — knowledge base, `group` — group knowledge base. An empty or whitespace-only string is rejected with `400 INVALID_PARAMS`. A value that matches no template returns an empty array |\n| `scope` (query) | string | no | — | Internal landing scope: `KNOWLEDGE` — knowledge base, `GROUP` — group knowledge base, `MAINPAGE` — main page. Omit it for a regular site |\n\nThe list is returned in full, without pagination.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X GET \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fpage-templates?siteType=page\" \\\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\u002Fpage-templates?siteType=page\" \\\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\u002Fpage-templates?siteType=page\", {\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\u002Fpage-templates?siteType=page\", {\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` | array | Page templates |\n| `data[].code` | string | Template code for the `templateCode` field when [creating a page from a template](\u002Fdocs\u002Fentities\u002Fpages\u002Ffrom-template). A code without `\u002F` or `@` is a standalone template, for example `empty` — a blank page. A code with `\u002F` is a page from a set, for example `wiki-dark\u002Fmain`. A code with `@` is a template from an application, where the part before `@` matches `appCode` |\n| `data[].title` | string | Template name in the language of the Bitrix24 account |\n| `data[].description` | string | Template description. An empty string if there is no description |\n| `data[].siteType` | string | Site type the template is intended for, in upper case: `PAGE`, `KNOWLEDGE`, `GROUP`. Mirrors the requested `siteType` |\n| `data[].available` | boolean | Whether a page can be created from this template |\n| `data[].appCode` | string | Code of the application that added the template. Absent for templates without an application |\n| `data[].previewUrl` | string | Preview image URL. Either a full URL with `https:\u002F\u002F` or a scheme-relative URL starting with `\u002F\u002F`. Absent if the template has no preview |\n\n## Response example\n\nThe example shows two templates from the full list:\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"code\": \"empty\",\n      \"title\": \"Blank page\",\n      \"description\": \"Build your own site from scratch and attract customers!\",\n      \"siteType\": \"PAGE\",\n      \"available\": true,\n      \"previewUrl\": \"\u002F\u002Fexample.bitrix24.com\u002Fbitrix\u002Fcomponents\u002Fbitrix\u002Flanding.demo\u002Fdata\u002Fpage\u002Fempty\u002Fpreview.jpg\"\n    },\n    {\n      \"code\": \"requisites\u002Fmain\",\n      \"title\": \"Business card site\",\n      \"description\": \"Find all the information you need about our company\",\n      \"siteType\": \"PAGE\",\n      \"available\": true\n    }\n  ]\n}\n```\n\n## Error response example\n\n400 — `scope` is not one of the allowed values:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_SCOPE\",\n    \"message\": \"scope must be KNOWLEDGE, GROUP or MAINPAGE, or omitted.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_PARAMS` | `siteType must be a non-empty string, for example page.` — `siteType` is empty or whitespace-only |\n| 400 | `INVALID_SCOPE` | `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |\n| 422 | `BITRIX_NO_EFFECT` | `Bitrix24 did not return page templates.` — Bitrix24 did not return the template list |\n| 422 | `BITRIX_NO_EFFECT` | `Bitrix24 returned an invalid template descriptor.` — the template code in the Bitrix24 response is missing or is not a string |\n| 403 | `SCOPE_DENIED` | The API key does not have the `landing` scope |\n| 403 | `BITRIX_ACCESS_DENIED` | The Bitrix24 user on whose behalf the key was issued has no access to sites |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 401 | `INVALID_API_KEY` | The key in `X-Api-Key` is not found or has been revoked |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 409 | `PORTAL_ADDRESS_CHANGED` | The on-premise Bitrix24 moved to a new address, while the key's webhook was issued for the old one. Reissue the key's webhook |\n| 429 | `RATE_LIMITED` | Bitrix24 request limit 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. The read can be retried |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **A template code is bound to the site type.** A code works only for a site of the type you requested it for in `siteType`.\n- **Unknown query parameters are ignored.** A parameter the method does not recognize causes no error and does not change the result.\n\n## See also\n\n- [Create a page from a template](\u002Fdocs\u002Fentities\u002Fpages\u002Ffrom-template)\n- [Pages](\u002Fdocs\u002Fentities\u002Fpages)\n- [Layout templates](\u002Fdocs\u002Fentities\u002Fsite-templates)\n- [Error codes](\u002Fdocs\u002Ferrors)\n",1795343851085]