# Task results: legacy REST

`GET /v1/tasks/:taskId/results`

Returns all task results in one call, without pagination: both the results added as text and the results created from chat messages and comments.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|----------|
| `taskId` (path) | number | yes | Task ID, a positive integer. List: [`GET /v1/tasks`](/docs/entities/tasks/list) |
| `WITH_USER_INFO` (query) | string | no | `Y` — add `userInfo` with the author's data to each result. `N` or omitted — do not add it |
| `WITH_FILE_INFO` (query) | string | no | `Y` — add `fileInfo` with file data to each result. `N` or omitted — do not add it |
| `WITH_PARSED_TEXT` (query) | string | no | `Y` — add `parsedText` and `fileInfo` to each result. `N` or omitted — do not add them |

## Examples

### curl — personal key

```bash
curl -X GET "https://vibecode.bitrix24.com/v1/tasks/4207/results" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl -X GET "https://vibecode.bitrix24.com/v1/tasks/4207/results" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks/4207/results', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log('Results:', data.length)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks/4207/results', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

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

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | `true` if the request succeeded |
| `data` | array | Task results in descending order of `id`: the most recently added result comes first. An empty array for a task without results |
| `data[].id` | number | Result ID. Needed to [update](/docs/entities/tasks/results-v3-update) and [delete](/docs/entities/tasks/results-v3-delete) the result |
| `data[].taskId` | number | Task ID |
| `data[].commentId` | number | ID of the comment on the old task card that the result was created from. A result added as text or from a chat message has `0`. List: [`GET /v1/tasks/:taskId/comments`](/docs/entities/task-comments/list) |
| `data[].createdBy` | number | ID of the employee who added the result. List: [`GET /v1/users`](/docs/entities/users/list) |
| `data[].createdAt` | string | Creation date and time in ISO 8601 format with a time zone offset, for example `2026-10-19T14:36:12+00:00`. A result created from a comment has the date of the comment, not of the call |
| `data[].updatedAt` | string | Date and time of the last change, in the same format |
| `data[].status` | number | Result status: `0` — open, `1` — closed |
| `data[].text` | string | Result text. May contain BB code markup |
| `data[].formattedText` | string | Result text with the BB code markup converted to HTML: `[b]Report[/b]` comes back as `<b>Report</b>` |
| `data[].files` | array | IDs of the result files. A result without files has an empty array. File data is in `fileInfo` |
| `data[].userInfo` | object | Only with `WITH_USER_INFO=Y`. Author data; the object key is the author ID from `createdBy` |
| `data[].userInfo.<id>.id` | string | Author ID as a string |
| `data[].userInfo.<id>.name` | string | First name |
| `data[].userInfo.<id>.secondName` | string \| null | Middle name. `null` if not filled in |
| `data[].userInfo.<id>.lastName` | string | Last name |
| `data[].userInfo.<id>.formattedName` | string | First and last name for display |
| `data[].userInfo.<id>.avatar` | string | URL of the employee's photo |
| `data[].fileInfo` | object | Only with `WITH_FILE_INFO=Y` or `WITH_PARSED_TEXT=Y`. File data for the result; the object key is the file ID. A result without files has an empty array `[]` |
| `data[].parsedText` | string | Only with `WITH_PARSED_TEXT=Y`. Result text. For a result without files, it matches `text` |

## Response example

```json
{
  "success": true,
  "data": [
    {
      "id": 29,
      "taskId": 4207,
      "commentId": 0,
      "createdBy": 1295,
      "createdAt": "2026-10-19T14:36:12+00:00",
      "updatedAt": "2026-10-19T14:36:12+00:00",
      "status": 0,
      "text": "Quarterly report approved",
      "formattedText": "Quarterly report approved",
      "files": []
    },
    {
      "id": 27,
      "taskId": 4207,
      "commentId": 0,
      "createdBy": 1295,
      "createdAt": "2026-10-19T14:36:11+00:00",
      "updatedAt": "2026-10-19T14:36:11+00:00",
      "status": 0,
      "text": "Draft report sent for approval",
      "formattedText": "Draft report sent for approval",
      "files": []
    }
  ]
}
```

## Error response example

400 — the flag value is neither `Y` nor `N`:

```json
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "WITH_USER_INFO must be Y or N"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `INVALID_PARAMS` | `taskId` is not a positive integer. Message: `taskId must be a positive integer` |
| 400 | `INVALID_PARAMS` | The query string contains a parameter that is not in the "Parameters" table. The name is case-sensitive: `with_user_info` is rejected too. Message: `query contains unsupported fields` |
| 400 | `INVALID_PARAMS` | The flag value is neither `Y` nor `N`. The message names the flag, for example `WITH_USER_INFO must be Y or N` |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |
| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens |
| 403 | `SCOPE_DENIED` | The key has no `task` scope |
| 422 | `BITRIX_ERROR` | The employee on whose behalf the call is made cannot read the task. Message: `Access denied.` |
| 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).

## Known specifics

**REST 3.0 results come back here in a different shape.** The author is in `createdBy`, not `authorId`, and the status is the number `0`, not the string `open`.

**The response does not distinguish a task without results from a task that does not exist.** For a request with a nonexistent `taskId`, a Bitrix24 account administrator's key gets `200` with an empty array. To check that the task exists, use [`GET /v1/tasks/:id`](/docs/entities/tasks/get).

## See also

- [Get the ID of the first task result](/docs/entities/tasks/results-first)
- [Get the ID of the last task result](/docs/entities/tasks/results-last)
- [Create a task result from a comment](/docs/entities/tasks/results-from-comment)
- [Task results: REST 3.0](/docs/entities/tasks/results-v3)
- [Tasks](/docs/entities/tasks)
