## Save a daily report

`PUT /v1/workday/records/:recordId/report`

Creates an employee's daily report in a work time record, or replaces the text of the record's existing report.

Requires the `timeman` scope. A report can be saved only to your own record — the credential owner's record. READONLY keys can read reports but cannot save them.

## Parameters

| Parameter | Type | Required | Default | Description |
|----------|-----|:-----:|-----------|----------|
| `recordId` (path) | integer | yes | — | ID of the credential owner's work time record. The record of the current or last workday — `data.id` in the [`GET /v1/workday/status`](/docs/workday/status) response. List: [`GET /v1/workday/records`](/docs/workday/records) |

## Request fields (body)

| Field | Type | Required | Description |
|------|-----|:-----:|----------|
| `reportText` | string | yes | Report text, BB code markup allowed. Replaces the previous text entirely. An empty string clears the text; the report remains |

## Examples

### curl — personal key

```bash
curl -X PUT "https://vibecode.bitrix24.com/v1/workday/records/185/report" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reportText": "[b]Done:[/b] daily summary"}'
```

### curl — OAuth application

```bash
curl -X PUT "https://vibecode.bitrix24.com/v1/workday/records/185/report" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"reportText": "[b]Done:[/b] daily summary"}'
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/workday/records/185/report', {
  method: 'PUT',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    reportText: '[b]Done:[/b] daily summary',
  }),
})
const { data } = await res.json()
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/workday/records/185/report', {
  method: 'PUT',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    reportText: '[b]Done:[/b] daily summary',
  }),
})
const { data } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | `true` when the request succeeds |
| `data` | object | The saved daily report. Field details — [Report fields](/docs/workday/daily-reports/fields) |
| `data.id` | integer | Daily report ID. Stays the same when the report is saved again. List: [`GET /v1/workday/daily-reports`](/docs/workday/daily-reports/list) |
| `data.recordId` | integer | Work time record ID. List: [`GET /v1/workday/records`](/docs/workday/records) |
| `data.userId` | integer | ID of the employee the report belongs to. List: [`GET /v1/users`](/docs/entities/users/list) |
| `data.type` | string | Always `REPORT` — the employee's report |
| `data.report` | string | Report text with BB code markup |
| `data.reportPlain` | string | Report text without markup |
| `data.timestamp` | string \| null | When the report was saved |
| `data.reportExtended` | null | The report written by AI or an automation rule is not included in this response. To get it, call [`GET /v1/workday/records/:recordId/report`](/docs/workday/daily-reports/get) with `withAi=true` |

## Response example

```json
{
  "success": true,
  "data": {
    "id": 379,
    "recordId": 185,
    "userId": 101,
    "type": "REPORT",
    "report": "[b]Done:[/b] daily summary",
    "reportPlain": "Done: daily summary",
    "timestamp": "2026-10-07T08:19:18.000Z",
    "reportExtended": null
  }
}
```

## Error response example

403 — the work time record belongs to another employee:

```json
{
  "success": false,
  "error": {
    "code": "BITRIX_ACCESS_DENIED",
    "message": "A daily report can only be saved to the current Bitrix24 user’s own workday record"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `INVALID_PARAMS` | `recordId` is not a positive integer, the request body is not a JSON object, `reportText` is missing or not a string, the body contains an unknown field, or a query string parameter is passed, such as `?withAi=true` — the method accepts none |
| 404 | `ENTITY_NOT_FOUND` | No work time record with this `recordId` exists |
| 403 | `BITRIX_ACCESS_DENIED` | The record belongs to another employee, including a subordinate. Message: `A daily report can only be saved to the current Bitrix24 user’s own workday record` |
| 403 | `BITRIX_ACCESS_DENIED` | The credential owner lacks the right to read the time records of the employee the record belongs to. Without this right, saving to one's own record is refused too. Message: `Access denied.` |
| 409 | `TIMEMAN_MODULE_NOT_ENABLED` | Time Management is not available on this portal |
| 422 | `BITRIX_ERROR` | Bitrix24 refused the operation |
| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned a response of an unexpected shape |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header was not passed |
| 401 | `TOKEN_MISSING` | An app key was sent without a session token in `Authorization: Bearer` |
| 401 | `INVALID_SESSION` | The session token is invalid or has expired |
| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is READONLY and cannot save reports |
| 403 | `SCOPE_DENIED` | The key lacks the `timeman` scope |
| 429 | `RATE_LIMITED` | The general request limit was exceeded |

The full list of common API errors — [Errors](/docs/errors).

## See also

- [Read a daily report](/docs/workday/daily-reports/get)
- [List daily reports](/docs/workday/daily-reports/list)
- [Report fields](/docs/workday/daily-reports/fields)
- [Workday history](/docs/workday/records)
- [Daily reports](/docs/workday/daily-reports)
- [Workday](/docs/workday)
