[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-workday\u002Fwork-reports\u002Fcreate":3,"docs-tabs-workday\u002Fwork-reports\u002Fcreate":6},{"content":4,"lastmod":5},"## Create a work report\n\n`POST \u002Fv1\u002Fworkday\u002Fwork-reports`\n\nCreates an employee's work report for a period. The new report is not submitted; submit it with a separate call.\n\nRequires the `timeman` scope. Bitrix24 checks the credential owner’s permissions. READONLY keys can read reports and cannot write them.\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|----------|\n| `userId` | integer | yes | ID of the employee the report belongs to. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `reportText` | string \\| null | no | Report text. Returned as `report` and `reportPlain` |\n| `reportExtended` | string \\| null | no | Additional report text. Returned as `reportExtended` |\n| `plansText` | string \\| null | no | Plans. Returned as `plans` |\n| `type` | string \\| null | no | Report type: `REPORT`, `AI_REPORT`, `ROBOT_REPORT`, `AI_DAY_PLAN`, or `ROBOT_DAY_PLAN`. If omitted or set to any other value, `REPORT` is used |\n| `dateFrom` | string \\| null | no | Start of the report period in ISO 8601 format with a time zone. The time is dropped; only the date is stored |\n| `dateTo` | string \\| null | no | End of the report period in the same format. The time is dropped; only the date is stored |\n| `tasks` | array \\| null | no | Tasks in the report |\n| `tasks[].id` | integer | yes | Task ID. List: [`GET \u002Fv1\u002Ftasks`](\u002Fdocs\u002Fentities\u002Ftasks\u002Flist) |\n| `tasks[].time` | number | no | Time spent on the task, in seconds. The fractional part is dropped |\n| `tasks[].title` | string | no | Task title in the report |\n| `events` | array \\| null | no | Calendar events in the report |\n| `events[].id` | integer | yes | Event ID. List: [`GET \u002Fv1\u002Fcalendar-events`](\u002Fdocs\u002Fentities\u002Fcalendar-events\u002Flist) |\n| `events[].ownerId` | integer | no | ID of the event owner. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `events[].title` | string | no | Event title in the report |\n| `autoFillDailyReports` | boolean | no | Defaults to `false` |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fworkday\u002Fwork-reports \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"userId\": 101, \"reportText\": \"Weekly report\" }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fworkday\u002Fwork-reports \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"userId\": 101, \"reportText\": \"Weekly report\" }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fworkday\u002Fwork-reports', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    userId: 101,\n    reportText: 'Weekly report',\n  }),\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\u002Fwork-reports', {\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({\n    userId: 101,\n    reportText: 'Weekly report',\n  }),\n})\nconst { data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | `true` when the report is created |\n| `data` | object | The created report. All fields — [Report fields](\u002Fdocs\u002Fworkday\u002Fwork-reports\u002Ffields) |\n\n## Response example\n\nThe main report fields are shown. For the full list, see [Report fields](\u002Fdocs\u002Fworkday\u002Fwork-reports\u002Ffields):\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 143,\n    \"userId\": 101,\n    \"active\": false,\n    \"reportType\": \"day\",\n    \"reportDate\": \"2026-10-06T18:22:40.000Z\",\n    \"dateFrom\": \"2026-10-05T21:00:00.000Z\",\n    \"dateTo\": \"2026-10-05T21:00:00.000Z\",\n    \"report\": \"Weekly report\",\n    \"type\": \"REPORT\",\n    \"mark\": \"N\",\n    \"approve\": \"N\"\n  }\n}\n```\n\n## Error response example\n\n400 — `userId` is missing:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"Expected a positive integer\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_PARAMS` | `userId` is missing, a field has the wrong type, a date has no time zone, or the body contains an unknown field such as `files` |\n| 403 | `BITRIX_ACCESS_DENIED` | The credential owner lacks the required Bitrix24 permissions |\n| 409 | `TIMEMAN_MODULE_NOT_ENABLED` | Time Management is not available on this portal |\n| 422 | `BITRIX_ERROR` | Bitrix24 refused the operation |\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 | `WRITE_BLOCKED_READONLY_KEY` | The key is READONLY and cannot create reports |\n| 403 | `SCOPE_DENIED` | The key lacks the `timeman` scope |\n| 429 | `RATE_LIMITED` | The general request limit was exceeded |\n\nThe full list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **The period can shift.** If the period overlaps a report the employee already has, the period start moves to the day after that report. The period chosen when `dateFrom` and `dateTo` are omitted shifts the same way. The resulting period is returned in the `dateFrom` and `dateTo` fields of the response.\n- **The employee and tasks are not checked for existence.** A report is created even with a nonexistent `userId` or `tasks[].id`. Only the credential owner’s permissions are checked.\n\n## See also\n\n- [Submit a work report](\u002Fdocs\u002Fworkday\u002Fwork-reports\u002Fsubmit)\n- [List work reports](\u002Fdocs\u002Fworkday\u002Fwork-reports\u002Flist)\n- [Work reports](\u002Fdocs\u002Fworkday\u002Fwork-reports)\n- [Daily reports](\u002Fdocs\u002Fworkday\u002Fdaily-reports)\n- [Workday](\u002Fdocs\u002Fworkday)\n","2026-10-07",{},1795415526260]