[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-workday\u002Fschedules-users":3,"docs-tabs-workday\u002Fschedules-users":6},{"content":4,"lastmod":5},"## Add an employee to a schedule\n\n`POST \u002Fv1\u002Fworkday\u002Fschedules\u002F:id\u002Fusers`\n\nAdds an employee to a work schedule. If the employee was excluded from this schedule, the exclusion is lifted and the schedule applies to them again.\n\nRequires the `timeman` scope and permission to manage work schedules in Bitrix24: the Bitrix24 account administrator always has it; an employee is granted it in the Time Management access permission settings. READONLY keys cannot add an employee to a schedule. To exclude an employee from a schedule, see [Remove an employee from a schedule](\u002Fdocs\u002Fworkday\u002Fschedules-users-delete).\n\n## Parameters\n\n| Parameter | Type | Required | Default | Description |\n|----------|-----|:-----:|-----------|----------|\n| `id` (path) | integer | yes | — | Work schedule ID, a positive integer. Where to get it: the work schedules page of the Bitrix24 account (`\u002Ftimeman\u002Fschedules\u002F`); the API has no schedule list. Check by ID: [`GET \u002Fv1\u002Fworkday\u002Fschedule`](\u002Fdocs\u002Fworkday\u002Fschedule) |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|----------|\n| `userId` | integer | yes | Employee ID, a positive integer. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fworkday\u002Fschedules\u002F13\u002Fusers\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"userId\": 503}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fworkday\u002Fschedules\u002F13\u002Fusers\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"userId\": 503}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fworkday\u002Fschedules\u002F13\u002Fusers', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ userId: 503 }),\n})\nconst { data } = await res.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fworkday\u002Fschedules\u002F13\u002Fusers', {\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({ userId: 503 }),\n})\nconst { data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | `true` when the employee is added to the schedule |\n| `data.schedule` | object | The schedule the employee was added to |\n| `data.schedule.id` | integer | Schedule ID |\n| `data.schedule.name` | string | Schedule name |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"schedule\": {\n      \"id\": 13,\n      \"name\": \"Office 5\u002F2\"\n    }\n  }\n}\n```\n\n## Error response example\n\n404 — no schedule with this `id`, or it has been deleted:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Schedule was not found\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_PARAMS` | `id` or `userId` is not a positive integer, or the request body is not an object |\n| 404 | `ENTITY_NOT_FOUND` | No schedule with this `id`, including a deleted one |\n| 422 | `BITRIX_ERROR` | The credential owner lacks permission to manage work schedules — the Bitrix24 text is in `message` |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode |\n| 409 | `TIMEMAN_MODULE_NOT_ENABLED` | Time Management is not available on this portal: the Time Management tool is switched off in the portal settings, or the module is not included in the plan |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned a response of an unexpected shape |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header was not passed |\n| 401 | `TOKEN_MISSING` | An app key was sent without a session token in `Authorization: Bearer` |\n| 401 | `INVALID_SESSION` | The session token is invalid or has expired |\n| 403 | `SCOPE_DENIED` | The key lacks the `timeman` scope |\n| 429 | `RATE_LIMITED` | The general request limit was exceeded; the retry delay is in the `Retry-After` header |\n\nThe full list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**The employee's other schedules stay unchanged.** Adding an employee to a schedule does not move them out of their other schedules: those assignments remain. To have the employee work only on the new schedule, exclude them from the previous one with [`DELETE \u002Fv1\u002Fworkday\u002Fschedules\u002F:id\u002Fusers\u002F:userId`](\u002Fdocs\u002Fworkday\u002Fschedules-users-delete).\n\n**The employee is not checked for existence.** An assignment is created even with a nonexistent `userId`: the response is `200`, and the schedule gets an assignment for that ID. To avoid adding a nonexistent employee to a schedule, look up their ID first with [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist).\n\n## See also\n\n- [Remove an employee from a schedule](\u002Fdocs\u002Fworkday\u002Fschedules-users-delete)\n- [Work schedule](\u002Fdocs\u002Fworkday\u002Fschedule)\n- [Delete a schedule](\u002Fdocs\u002Fworkday\u002Fschedules-delete)\n- [Workday](\u002Fdocs\u002Fworkday)\n","2026-10-12",{},1795000592030]