## Add a task result

`POST /v1/task-results`

Adds a result to a task — text that sums up the work on it. One result per call.

## Request fields (body)

| Field | Type | Required | Description |
|------|-----|:-----:|----------|
| `fields` | object | yes | Result fields |
| `fields.taskId` | number | yes | Task ID. List: [`GET /v1/tasks`](/docs/entities/tasks/list). Number only: the method returns `400` for the string `"4205"` |
| `fields.text` | string | yes | Result text. The method returns `400` for an empty string |

## Examples

### curl — personal key

```bash
curl -X POST "https://vibecode.bitrix24.com/v1/task-results" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fields": {
      "taskId": 4205,
      "text": "Quarterly report approved"
    }
  }'
```

### curl — OAuth application

```bash
curl -X POST "https://vibecode.bitrix24.com/v1/task-results" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "fields": {
      "taskId": 4205,
      "text": "Quarterly report approved"
    }
  }'
```

### JavaScript — personal key

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

const { success, data } = await res.json()
console.log('Result ID:', data.item.id)
```

### JavaScript — OAuth application

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

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

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | `true` if the result was added |
| `data` | object | Wrapper with the created result |
| `data.item` | object | Created result |
| `data.item.id` | number | Result ID. Needed to [update](/docs/entities/tasks/results-v3-update) and [delete](/docs/entities/tasks/results-v3-delete) the result |
| `data.item.taskId` | number | Task ID |
| `data.item.text` | string | Result text |
| `data.item.authorId` | number | ID of the employee who added the result. 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, for example `2026-10-16T09:44:55+00:00` |
| `data.item.updatedAt` | string | Date and time of the last change, in the same format |
| `data.item.status` | string | Result status. A new result has `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` | null | ID of the chat message the result was created from. A result added by this method has `null` |

## Response example

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

## Error response example

400 — there is no task with this `taskId`:

```json
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "Error validating request object.",
    "validation": [
      {
        "message": "Task not found"
      }
    ]
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `INVALID_PARAMS` | The body is not a JSON object or has no `fields` object. Message: `fields must be an object` |
| 400 | `INVALID_PARAMS` | There is no task with this `taskId`. `error.validation` contains `Task not found` |
| 400 | `INVALID_PARAMS` | `taskId` was passed as a string, or `text` is an empty string. The reason is in `error.validation` |
| 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 permission to add results to this task |
| 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 `taskId` or `text`. The missing fields are listed 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)
- [Create a task result from a chat message](/docs/entities/tasks/results-v3-from-chat-message)
- [Update a task result](/docs/entities/tasks/results-v3-update)
- [Delete a task result](/docs/entities/tasks/results-v3-delete)
- [Task results: legacy REST](/docs/entities/tasks/results)
