[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fcalendar-resources\u002Fcreate":3,"docs-tabs-entities\u002Fcalendar-resources\u002Fcreate":6},{"content":4,"lastmod":5},"\n## Create calendar resource\n\n`POST \u002Fv1\u002Fcalendar-resources`\n\nCreates a calendar resource with the specified name.\n\nThe request body is flat — no `fields` wrapper.\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|---------|\n| `name` | string | yes | Resource name |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcalendar-resources\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"name\": \"Meeting room 2\"}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcalendar-resources\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"name\": \"Meeting room 2\"}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcalendar-resources', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ name: 'Meeting room 2' }),\n})\n\nconst { success, data } = await res.json()\nconsole.log('Resource ID:', data.id)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcalendar-resources', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ name: 'Meeting room 2' }),\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\nA successful creation returns HTTP status `201 Created`.\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data.id` | number | ID of the created resource. The resource name and creator are returned by [`GET \u002Fv1\u002Fcalendar-resources`](.\u002Flist.md) |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 285\n  }\n}\n```\n\n## Error response example\n\n400 — empty request body:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"EMPTY_CREATE_BODY\",\n    \"message\": \"Request body is empty — provide at least one field to create calendarResource.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `EMPTY_CREATE_BODY` | The request body is empty — pass `name` |\n| 400 | `READONLY_FIELD` | The body contains a read-only field — `id` or `createdBy` |\n| 422 | `BITRIX_ERROR` | `name` is an empty string. Message: the required parameter `name` is not set |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The API key is in read-only mode — writes are forbidden |\n| 403 | `SCOPE_DENIED` | The API key does not have the `calendar` scope |\n| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied the key owner permission to create the resource |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header was not passed |\n| 429 | `RATE_LIMITED` | Rate limit exceeded |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned a malformed response |\n| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond in time |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**Several resources in one call.** `POST \u002Fv1\u002Fcalendar-resources\u002Fbatch` with the `create` action creates resources in a batch: `{\"action\": \"create\", \"items\": [{\"name\": \"Meeting room 2\"}]}`. The IDs of the created resources are returned in `data.results[].id`.\n\n## See also\n\n- [List calendar resources](.\u002Flist.md)\n- [Rename calendar resource](.\u002Fupdate.md)\n- [Delete calendar resource](.\u002Fdelete.md)\n- [Resource bookings](.\u002Fbookings.md)\n- [Calendar resources](\u002Fdocs\u002Fentities\u002Fcalendar-resources)\n","2026-10-13",{},1795376879944]