# List activity history for a task

`GET /api/task/{taskId}/history`

URL: https://repsona.com/api/get-task-taskid-history

Returns the activity feed filtered to this task.

## Parameters

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `taskId` | path | integer | required | ID of the task. |
| `beforeId` | query | integer |  | Cursor for paging. Pass the `nextBeforeId` of the previous response to get older history entries. Omit for the newest. |
| `limit` | query | integer |  | Number of history entries to return (1 to 50). |

## Request

```sh
curl -X GET "https://<space>.repsona.com/api/task/{taskId}/history" \
  -H "Authorization: Bearer $REPSONA_API_KEY"
```

## Responses

- 200: Activity history
- 400: Invalid query parameters
- 401: Authentication is required
- 403: Not a project member
- 404: Task not found

## Example response

```json
{
  "activities": [
    {
      "id": 22427,
      "createdAt": 1793662651455,
      "model": "Task",
      "modelId": 100451,
      "property": "description",
      "isMultiple": false,
      "action": "update",
      "message": "タスクの詳細を更新しました",
      "user": {
        "id": 1127,
        "name": "emma",
        "fullName": "Emma Carter",
        "avatarUrl": null,
        "state": "active",
        "extra": {
          "color": null
        }
      },
      "project": {
        "id": 296,
        "name": "website",
        "fullName": "Website renewal"
      },
      "ref": {
        "link": {
          "text": null,
          "path": null
        },
        "fromContent": null,
        "toContent": null,
        "content": null
      }
    },
    {
      "id": 22426,
      "createdAt": 1793662651451,
      "model": "Task",
      "modelId": 100451,
      "property": "status",
      "isMultiple": false,
      "action": "update",
      "message": "タスクのステータスを更新しました",
      "user": {
        "id": 1127,
        "name": "emma",
        "fullName": "Emma Carter",
        "avatarUrl": null,
        "state": "active",
        "extra": {
          "color": null
        }
      },
      "project": {
        "id": 296,
        "name": "website",
        "fullName": "Website renewal"
      },
      "ref": {
        "link": {
          "text": "Write release notes",
          "path": "/p/296/task/100451"
        },
        "fromContent": "To do",
        "toContent": "In progress",
        "content": "To do → In progress"
      }
    }
  ]
}
```
