
## List time-tracking entries

`GET /v1/tasks/:taskId/time`

Returns all time-tracking entries of a specific task, sorted by `id` (newest first).

## Parameters

| Parameter | Type | Required | Default | Description |
|----------|-----|:-----:|-----------|---------|
| `taskId` (path) | number | yes | — | Task ID |
| `limit` (query) | number | | `50` | Page size |
| `offset` (query) | number | | `0` | Skip N entries |

**Filter format.** The task is provided by the `taskId` path parameter. The generic `filter` envelope is not supported: any bracket key `filter[...]`, a non-empty `filter` value, a JSON form including `filter={}`, or a repeated `filter` parameter returns `400 UNSUPPORTED_FILTER`. A single empty `filter=` parameter means no filter and still returns `200`. To filter by employee or period, use [GET /v1/task-time](./global-list.md) with the named parameters `userId`, `taskId`, `from`, and `to`.

## Examples

### curl — personal key

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

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/tasks/289/time" \
  -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/289/time', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data, meta } = await res.json()
const totalSeconds = data.reduce((sum, r) => sum + r.seconds, 0)
console.log(`Total for the task: ${totalSeconds / 60} min`)
```

### JavaScript — OAuth application

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

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

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | array | Array of time-tracking entries |
| `data[].id` | number | Entry identifier |
| `data[].taskId` | number | Parent task ID |
| `data[].userId` | number | Author. Profile: `GET /v1/users/:userId` |
| `data[].seconds` | number | Duration in seconds |
| `data[].minutes` | number | Duration in minutes (derived from `seconds`) |
| `data[].commentText` | string | Comment for the entry |
| `data[].source` | string | Source: `2` — REST API |
| `data[].createdDate` | datetime | When the entry was created |
| `data[].dateStart` | datetime | Start of the tracked interval (filled automatically) |
| `data[].dateStop` | datetime | End of the tracked interval (filled automatically) |
| `meta.total` | number | Total number of time-tracking entries for the task |

## Response example

```json
{
  "success": true,
  "data": [
    {
      "id": 163,
      "taskId": 289,
      "userId": 1,
      "commentText": "Draft preparation",
      "seconds": 1800,
      "minutes": 30,
      "source": "2",
      "createdDate": "2026-05-13T16:15:43+00:00",
      "dateStart": "2026-05-13T17:15:43+00:00",
      "dateStop": "2026-05-13T17:15:43+00:00"
    },
    {
      "id": 161,
      "taskId": 289,
      "userId": 1,
      "commentText": "",
      "seconds": 600,
      "minutes": 10,
      "source": "2",
      "createdDate": "2026-05-13T16:15:41+00:00",
      "dateStart": "2026-05-13T17:15:41+00:00",
      "dateStop": "2026-05-13T17:15:41+00:00"
    }
  ],
  "meta": {
    "total": 2
  }
}
```

## Error response example

403 — no scope:

```json
{
  "success": false,
  "error": {
    "code": "SCOPE_DENIED",
    "message": "This endpoint requires 'task' scope"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `UNSUPPORTED_FILTER` | An unsupported `filter` was provided; the task comes from the path, while employee and period filters are available on `GET /v1/task-time` |
| 403 | `SCOPE_DENIED` | The API key lacks the `task` scope |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |
| 404 | `TASK_NOT_FOUND` | There is no task with this `taskId`, or it is not visible to this key |
| 422 | `BITRIX_ERROR` | Bitrix24 returned an error while reading |

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

## Known specifics

**Descending sort by `id`.** The most recently added entries are returned first. `limit` and `offset` work on top of this sort.

## See also

- [Get a time-tracking entry](./get.md)
- [Add an entry](./create.md)
- [Update a time-tracking entry](./update.md)
- [Delete a time-tracking entry](./delete.md)
- [Tasks](/docs/entities/tasks)
