[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fdoc-templates\u002Fdelete":3,"docs-tabs-entities\u002Fdoc-templates\u002Fdelete":6},{"content":4,"lastmod":5},"\n## Delete template\n\n`DELETE \u002Fv1\u002Fdoc-templates\u002F:id`\n\nDeletes a document template by identifier. A deleted template cannot be restored via the API — create a new one if needed.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Template identifier |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fdoc-templates\u002F209\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fdoc-templates\u002F209\" \\\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 res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fdoc-templates\u002F209', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nif (res.status === 204) {\n  console.log('Template deleted')\n}\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fdoc-templates\u002F209', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nif (res.status === 204) {\n  console.log('Template deleted')\n}\n```\n\n## Response\n\nOn successful deletion an HTTP `204 No Content` status is returned with an empty body; the success indicator is the response code, not the content.\n\n## Response example\n\n```http\nHTTP\u002F1.1 204 No Content\n```\n\n## Error response example\n\n404 — template not found:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Template was not found.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 404 | `ENTITY_NOT_FOUND` | No template with the given `id` (including a repeated delete) |\n| 403 | `SCOPE_DENIED` | The key lacks the `documentgenerator` scope |\n| 401 | `TOKEN_MISSING` | The key has no configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Get template](\u002Fdocs\u002Fentities\u002Fdoc-templates\u002Fget)\n- [List templates](\u002Fdocs\u002Fentities\u002Fdoc-templates\u002Flist)\n- [Create template](\u002Fdocs\u002Fentities\u002Fdoc-templates\u002Fcreate)\n","2026-09-22",{},1795415243620]