## Update a task result

`PATCH /v1/task-results/:id`

Replaces the text of a task result. The author, the task and the creation date of the result stay unchanged.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|----------|
| `id` (path) | number | yes | Result ID, a positive integer. Take it from `data.item.id` in the response to [adding a result](/docs/entities/tasks/results-v3-create) or [creating one from a message](/docs/entities/tasks/results-v3-from-chat-message). List: [`GET /v1/tasks/:taskId/results`](/docs/entities/tasks/results) |

## Request fields (body)

| Field | Type | Required | Description |
|------|-----|:-----:|----------|
| `fields` | object | yes | Result fields to change |
| `fields.text` | string | yes | New result text. An empty string gets a `422` response |

## Examples

### curl — personal key

```bash
curl -X PATCH "https://vibecode.bitrix24.com/v1/task-results/21" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fields": {
      "text": "Quarterly report approved by the sales team"
    }
  }'
```

### curl — OAuth application

```bash
curl -X PATCH "https://vibecode.bitrix24.com/v1/task-results/21" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "fields": {
      "text": "Quarterly report approved by the sales team"
    }
  }'
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/task-results/21', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    fields: {
      text: 'Quarterly report approved by the sales team',
    },
  }),
})

const { success, data } = await res.json()
console.log('Updated:', data.item.updatedAt)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/task-results/21', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    fields: {
      text: 'Quarterly report approved by the sales team',
    },
  }),
})

const { success, data } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | `true` if the text was changed |
| `data` | object | Wrapper with the updated result |
| `data.item` | object | The result after the change |
| `data.item.id` | number | Result ID |
| `data.item.taskId` | number | Task ID |
| `data.item.text` | string | New result text |
| `data.item.authorId` | number | ID of the result author. List: [`GET /v1/users`](/docs/entities/users/list) |
| `data.item.createdAt` | string | Creation date and time in ISO 8601 format with a time zone offset |
| `data.item.updatedAt` | string | Date and time of this change, in the same format |
| `data.item.status` | string | Result status, for example `open` |
| `data.item.fileIds` | null | Result files. A result without files has `null` |
| `data.item.rights` | object | Permissions on the result |
| `data.item.rights.edit` | boolean | `true` — the result text can be changed |
| `data.item.rights.remove` | boolean | `true` — the result can be deleted |
| `data.item.messageId` | number \| null | ID of the chat message if the result was created [from a message](/docs/entities/tasks/results-v3-from-chat-message). Otherwise `null` |

## Response example

```json
{
  "success": true,
  "data": {
    "item": {
      "id": 21,
      "taskId": 4205,
      "text": "Quarterly report approved by the sales team",
      "authorId": 1295,
      "createdAt": "2026-10-16T09:44:55+00:00",
      "updatedAt": "2026-10-16T09:44:57+00:00",
      "status": "open",
      "fileIds": null,
      "rights": {
        "edit": true,
        "remove": true
      },
      "messageId": null
    }
  }
}
```

## Error response example

403 — no result with this `id`:

```json
{
  "success": false,
  "error": {
    "code": "BITRIX_ACCESS_DENIED",
    "message": "Access denied",
    "hint": "Bitrix24 reports an access-rights refusal for tasks.task.result.update, not a scope error. The Bitrix24 user this call runs as lacks access; ask a portal admin to grant it, or call under a user who has it.",
    "cause": "b24_permission",
    "method": "tasks.task.result.update",
    "fix": {
      "action": "grant_b24_rights",
      "via": "portal_admin"
    }
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `INVALID_PARAMS` | `id` is not a positive integer. Message: `id must be a positive safe integer` |
| 400 | `INVALID_PARAMS` | The body is not a JSON object or has no `fields` object. Message: `fields must be an object` |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |
| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens |
| 403 | `BITRIX_ACCESS_DENIED` | No result with this `id`, including one already deleted. The same code is returned when access to the result is denied |
| 403 | `SCOPE_DENIED` | The key has no `task` scope |
| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode. `error.details.switchUrl` contains the URL of the section where the mode is changed |
| 415 | `FST_ERR_CTP_INVALID_MEDIA_TYPE` | A non-empty body with a `Content-Type` other than `application/json` |
| 422 | `BITRIX_ERROR` | `fields` has no `text`, or `text` is an empty string. The reason is in `error.validation` |
| 429 | `RATE_LIMITED` | Request rate exceeded. The effective cap is in the `x-ratelimit-limit` header |

Full list of common API errors: [Errors](/docs/errors).

## See also

- [Task results: REST 3.0](/docs/entities/tasks/results-v3)
- [Add a task result](/docs/entities/tasks/results-v3-create)
- [Create a task result from a chat message](/docs/entities/tasks/results-v3-from-chat-message)
- [Delete a task result](/docs/entities/tasks/results-v3-delete)
- [Task results: legacy REST](/docs/entities/tasks/results)
