[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-infra\u002Fwork-schedules\u002Flist":3,"docs-tabs-infra\u002Fwork-schedules\u002Flist":6},{"content":4,"lastmod":5},"## List schedules\n\n`GET \u002Fv1\u002Fwork-schedules`\n\nReturns the work schedule library of the Bitrix24 account — platform presets and custom schedules — with the number of servers assigned to each.\n\n## Parameters\n\nNo parameters. The library of a Bitrix24 account is limited to the platform presets and 50 custom schedules, so filtering and pagination are not provided.\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\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\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fwork-schedules', {\n  headers: { 'X-Api-Key': 'YOUR_API_KEY' },\n})\nconst { data } = await res.json()\nconst own = data.filter(s => s.kind === 'CUSTOM')\nconsole.log(`Schedules: ${data.length}, custom: ${own.length}`)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fwork-schedules', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\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` | array | Schedules of the Bitrix24 account: presets first, then custom schedules in the order they were created |\n| `data[].id` | string | Schedule ID. Accepted by [setting a server's run mode](\u002Fdocs\u002Finfra\u002Flifecycle\u002Frun-mode) and the other library operations |\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 windows |\n| `data[].windows` | array | Windows `{ isoDay, start, end }` in local time. Window rules are on the [section index](\u002Fdocs\u002Finfra\u002Fwork-schedules) |\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 applications in the Bitrix24 account's galaxy use this schedule when no run mode is specified at creation. 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 by default. At most one schedule has `true`; this flag is set separately from `defaultForNewMachines` |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"id\": \"cmfp4qz7x00031ocg5d1a8k2m\",\n      \"kind\": \"PRESET\",\n      \"name\": \"Weekdays 9–18\",\n      \"presetKey\": \"weekdays-9-18\",\n      \"timezone\": \"Europe\u002FBerlin\",\n      \"windows\": [\n        { \"isoDay\": 1, \"start\": \"09:00\", \"end\": \"18:00\" },\n        { \"isoDay\": 2, \"start\": \"09:00\", \"end\": \"18:00\" },\n        { \"isoDay\": 3, \"start\": \"09:00\", \"end\": \"18:00\" },\n        { \"isoDay\": 4, \"start\": \"09:00\", \"end\": \"18:00\" },\n        { \"isoDay\": 5, \"start\": \"09:00\", \"end\": \"18:00\" }\n      ],\n      \"version\": 1,\n      \"canEdit\": false,\n      \"assignedCount\": 3,\n      \"defaultForNewMachines\": false,\n      \"defaultForNewAgents\": false\n    },\n    {\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\n## Error response example\n\n403 — the key lacks the `vibe:infra` scope:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INFRA_SCOPE_REQUIRED\",\n    \"message\": \"This API key does not have infrastructure rights (scope vibe:infra).\",\n    \"details\": { \"requiredScope\": \"vibe:infra\" }\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 controls servers and their billing, so Cowork keys cannot access it, even for read operations. For the required key, see — [Project key for deploy](\u002Fdocs\u002Fcowork\u002Fdeploy-key) |\n| 404 | `NOT_FOUND` | The key is not bound to a Bitrix24 account |\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## Known specifics\n\n- **The list is empty until run modes are enabled.** The presets are added to the account's library when run modes are enabled, and custom schedules cannot be created before that. An empty `data` for such an account is not an error.\n- **A preset's `name` depends on the key.** The name is not stored in the data — it is translated into the key owner's language, so two keys of the same Bitrix24 account can get different strings. Identify a preset reliably by `presetKey`.\n\n## See also\n\n- [Get a schedule](.\u002Fget.md)\n- [Create a schedule](.\u002Fcreate.md)\n- [Set the server run mode](\u002Fdocs\u002Finfra\u002Flifecycle\u002Frun-mode)\n","2026-11-05",{},1794739578778]