[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-infra\u002Fwork-schedules\u002Fget":3,"docs-tabs-infra\u002Fwork-schedules\u002Fget":6},{"content":4,"lastmod":5},"## Get a schedule\n\n`GET \u002Fv1\u002Fwork-schedules\u002F:id`\n\nReturns one work schedule from the library of the Bitrix24 account: windows by weekday, time zone, version and the number of assigned servers.\n\n## Parameters\n\n| Parameter | In | Type | Required | Description |\n|----------|---|-----|:-----:|----------|\n| `id` | path | string | yes | Schedule ID. Source — `data[].id` from the [schedule list](.\u002Flist.md) or `workSchedule.id` in [`GET \u002Fv1\u002Finfra\u002Fservers\u002F:id`](\u002Fdocs\u002Finfra\u002Fservers\u002Fget) |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -H \"X-Api-Key: YOUR_API_KEY\" \\\n  https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fwork-schedules\u002FWORK_SCHEDULE_ID\n```\n\n### curl — OAuth application\n\n```bash\ncurl -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fwork-schedules\u002FWORK_SCHEDULE_ID\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch(\n  `https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fwork-schedules\u002F${workScheduleId}`,\n  { headers: { 'X-Api-Key': 'YOUR_API_KEY' } }\n)\nconst { data } = await res.json()\nconsole.log(`${data.name}: ${data.windows.length} windows, ${data.assignedCount} servers`)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch(\n  `https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fwork-schedules\u002F${workScheduleId}`,\n  {\n    headers: {\n      'X-Api-Key': 'YOUR_APP_KEY',\n      'Authorization': 'Bearer USER_SESSION_TOKEN',\n    },\n  }\n)\nconst { data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | Always `true` on success |\n| `data.id` | string | Schedule ID |\n| `data.kind` | string | `PRESET` — a platform preset, `CUSTOM` — a custom schedule |\n| `data.name` | string | Name. A preset's name is returned in the key owner's language |\n| `data.presetKey` | string \\| null | Preset key: `weekdays-9-18`, `weekdays-9-19`, `weekdays-9-20`, `weekdays-8-19`, `weekdays-8-20`, `daily-9-21`. `null` for a custom schedule |\n| `data.timezone` | string | IANA time zone used to interpret the time windows |\n| `data.windows` | array | Windows `{ isoDay, start, end }`: `isoDay` from 1 (Monday) to 7, `start` and `end` in local `HH:MM`, the end of the day is `24:00` |\n| `data.version` | number | Version number. Passed to [update](.\u002Fupdate.md) |\n| `data.canEdit` | boolean | Whether the key owner may edit and delete the schedule. Always `false` for a preset |\n| `data.assignedCount` | number | How many servers of the Bitrix24 account run on the schedule, other employees' servers included. The servers themselves are not named |\n| `data.defaultForNewMachines` | boolean | New servers and galaxy applications in the Bitrix24 account use this schedule if no mode is specified when they are created. At most one schedule has `true`. A Bitrix24 account administrator sets this flag — [Set the default schedule](.\u002Fset-default.md) |\n| `data.defaultForNewAgents` | boolean | New agents and bots in the Bitrix24 account use this schedule when they are created. At most one schedule has `true`; this flag is set independently of `defaultForNewMachines` |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"cmfp4r0q2000a1ocg7h2k9x3d\",\n    \"kind\": \"CUSTOM\",\n    \"name\": \"Warehouse shifts\",\n    \"presetKey\": null,\n    \"timezone\": \"Europe\u002FBerlin\",\n    \"windows\": [\n      { \"isoDay\": 1, \"start\": \"09:00\", \"end\": \"18:00\" },\n      { \"isoDay\": 2, \"start\": \"09:00\", \"end\": \"13:00\" },\n      { \"isoDay\": 2, \"start\": \"14:00\", \"end\": \"24:00\" }\n    ],\n    \"version\": 2,\n    \"canEdit\": true,\n    \"assignedCount\": 1,\n    \"defaultForNewMachines\": true,\n    \"defaultForNewAgents\": false\n  }\n}\n```\n\n## Error response example\n\n404 — no such schedule in the key's Bitrix24 account:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"NOT_FOUND\",\n    \"message\": \"Work schedule not found\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 401 | `INVALID_API_KEY` | The key is not recognized: no such key exists on the platform |\n| 403 | `INFRA_SCOPE_REQUIRED` | The key lacks the `vibe:infra` scope |\n| 403 | `INFRA_FORBIDDEN_FOR_COWORK_KEY` | The call was made with a Cowork key. The schedule library manages servers and their billing, so Cowork keys cannot access it, including for read operations. For the next steps, see — [Project key for deploy](\u002Fdocs\u002Fcowork\u002Fdeploy-key) |\n| 404 | `NOT_FOUND` | No schedule with this `id` exists in the key's Bitrix24 account, or the key is not bound to a Bitrix24 account. A schedule of another account gets the same answer — the response does not confirm that it exists |\n| 429 | `RATE_LIMITED` | The limit of 60 requests per minute per key is exceeded. The current limit is returned in the `x-ratelimit-limit` header |\n\nFor the full list of common API errors, see [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [List schedules](.\u002Flist.md)\n- [Update a schedule](.\u002Fupdate.md)\n- [Delete a schedule](.\u002Fdelete.md)\n","2026-11-05",{},1794739578646]