> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.awork.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.awork.com/_mcp/server.

# Returns all activities of the task with the specified id.

GET https://api.awork.com/api/v1/tasks/{taskId}/activities

The activities contain information about the type of the activity, which property was changed and by whom.
This contains changes to first-level properties of the task, like name, description, status, etc., as well as several related entities, such as tags, assignments, etc.
This does not include activities of sub-entities, like tasks of a project or comments on a task.Any authenticated user.

Reference: https://developers.awork.com/apiv1/task-activities/get-task-activities

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `taskId` (string, required) — The id of the task.

### Query parameters

- `page` (integer, optional, default: 1) — Page number for pagination
- `pageSize` (integer, optional, default: 10) — Number of items per page
- `orderby` (string, optional) — The properties to order by
- `filterby` (string, optional) — The filter expression to filter by

## Response

### 200

OK

- `list of ActivityModel`

## Errors

### 400 Bad Request Error

Bad Request

- `code` (string, required) — The error code.
- `description` (string, required) — The description of the error.
- `link` (string, required) — The link to the API documentation page.
- `details` (list of string, optional, nullable) — A list of details describing the error.
- `validationErrors` (list of ValidationErrorResponse, optional, nullable) — If a validation error occurred, this contains the validation errors for each property.
- `traceId` (string, optional, nullable) — The request trace id for tracking the request.

### 401 Unauthorized Error

Unauthorized

- `code` (string, required) — The error code.
- `description` (string, required) — The description of the error.
- `link` (string, required) — The link to the API documentation page.
- `details` (list of string, optional, nullable) — A list of details describing the error.
- `validationErrors` (list of ValidationErrorResponse, optional, nullable) — If a validation error occurred, this contains the validation errors for each property.
- `traceId` (string, optional, nullable) — The request trace id for tracking the request.

### 404 Not Found Error

Not Found

- `code` (string, required) — The error code.
- `description` (string, required) — The description of the error.
- `link` (string, required) — The link to the API documentation page.
- `details` (list of string, optional, nullable) — A list of details describing the error.
- `validationErrors` (list of ValidationErrorResponse, optional, nullable) — If a validation error occurred, this contains the validation errors for each property.
- `traceId` (string, optional, nullable) — The request trace id for tracking the request.

## Types

### ActivityModel

The model to retrieve activities for main entities. Includes additional/aggregated properties for easier access to the most important information.

- `id` (string, optional)
- `originType` (string, optional, nullable) — Gets or sets whether the activity originated from a human or an agent.
- `threadId` (string, optional, nullable) — Gets or sets the originating agent thread.
- `threadAvailable` (boolean, optional) — Gets or sets whether the originating thread can still be opened.
- `agentId` (string, optional, nullable) — Gets or sets the agent that produced the activity.
- `agentNameSnapshot` (string, optional, nullable) — Gets or sets the agent name captured when the run was accepted.
- `executingUserId` (string, optional, nullable) — Gets or sets the user whose permissions and ownership applied to the run.
- `triggeredByUserId` (string, optional, nullable) — Gets or sets the user who triggered the run when different from the executing user.
- `entityType` (string, optional, nullable) — The type of the entity
- `entityId` (string, optional)
- `entity` (NestedModel, optional)
- `createdBy` (string, optional)
- `updatedBy` (string, optional)
- `createdOn` (string, optional)
- `updatedOn` (string, optional)
- `eventType` (string, optional, nullable) — The type of the event of this activity log (e.g: added, updated, deleted)
- `eventDate` (string, optional)
- `changedProperty` (string, optional, nullable) — The name of the property that has changed.
- `oldPropertyValue` (string, optional, nullable) — The previous value of the updated property (as string).
- `newPropertyValue` (string, optional, nullable) — The new value for the property (as string).
- `oldProperty` (any, optional, nullable) — The old property value, if the property is a complex object. This is used to store the old value of the property when it is an object, like a user or a task.
- `newProperty` (any, optional, nullable) — The new property value, if the property is a complex object. This is used to store the new value of the property when it is an object, like a user or a task.
- `userId` (string, optional, nullable) — The id of the user that performed the action that created this activity log entry.
- `user` (NestedUserModel, optional)
- `parentId` (string, optional, nullable)
- `projectId` (string, optional, nullable)
- `project` (BasicNameModel, optional)
- `taskId` (string, optional, nullable)
- `task` (NameModel, optional)
- `assignedUserId` (string, optional, nullable)
- `assignedUser` (NestedUserModel, optional)
- `unassignedUserId` (string, optional, nullable)
- `unassignedUser` (NestedUserModel, optional)
- `dueDate` (string, optional, nullable)
- `duration` (integer, optional, nullable)
- `memberId` (string, optional, nullable)
- `member` (NestedUserModel, optional)

### ValidationErrorResponse

The validation error response.

- `property` (string, optional, nullable) — The name of the property that failed validation.
- `message` (string, optional, nullable) — The reason why this property failed validation.

### NestedModel

- `id` (string, optional) — The identifier of the nested model.
- `name` (string, optional, nullable) — The name of the entity.

### NestedUserModel

- `id` (string, optional) — The identifier of the nested model.
- `firstName` (string, optional, nullable) — The first name of the user.
- `lastName` (string, optional, nullable) — The last name of the user.
- `hasImage` (boolean, optional, nullable) — Whether this user has a profile image.

### BasicNameModel

- `id` (string, optional) — The unique identifier of the entity.
- `name` (string, optional, nullable) — The name of the entity.
- `projectTypeIcon` (string, optional, nullable)
- `projectCompanyProfileImageUrl` (string, optional, nullable)

### NameModel

- `id` (string, optional)
- `name` (string, optional, nullable)

## Examples

**Response**

```json
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "originType": "string",
    "threadId": "123e4567-e89b-12d3-a456-426614174000",
    "threadAvailable": true,
    "agentId": "123e4567-e89b-12d3-a456-426614174000",
    "agentNameSnapshot": "string",
    "executingUserId": "123e4567-e89b-12d3-a456-426614174000",
    "triggeredByUserId": "123e4567-e89b-12d3-a456-426614174000",
    "entityType": "timetracking",
    "entityId": "123e4567-e89b-12d3-a456-426614174000",
    "entity": {
      "id": "80a2b26b-9fb3-42b5-b6dc-126c437cad5d",
      "name": "Design"
    },
    "createdBy": "123e4567-e89b-12d3-a456-426614174000",
    "updatedBy": "123e4567-e89b-12d3-a456-426614174000",
    "createdOn": "2024-01-15T09:30:00Z",
    "updatedOn": "2024-01-15T09:30:00Z",
    "eventType": "updated",
    "eventDate": "2024-01-15T09:30:00Z",
    "changedProperty": "StartOn",
    "oldPropertyValue": "2022-03-11T14:00:05.100Z",
    "newPropertyValue": "2022-03-15T11:30:00.100Z",
    "oldProperty": null,
    "newProperty": null,
    "userId": "123e4567-e89b-12d3-a456-426614174000",
    "user": {
      "id": "80a2b26b-9fb3-42b5-b6dc-126c437cad5d",
      "firstName": "Carla",
      "lastName": "Creative",
      "hasImage": true
    },
    "parentId": "123e4567-e89b-12d3-a456-426614174000",
    "projectId": "123e4567-e89b-12d3-a456-426614174000",
    "project": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "Website design",
      "projectTypeIcon": "string",
      "projectCompanyProfileImageUrl": "string"
    },
    "taskId": "123e4567-e89b-12d3-a456-426614174000",
    "task": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "string"
    },
    "assignedUserId": "123e4567-e89b-12d3-a456-426614174000",
    "assignedUser": {
      "id": "80a2b26b-9fb3-42b5-b6dc-126c437cad5d",
      "firstName": "Carla",
      "lastName": "Creative",
      "hasImage": true
    },
    "unassignedUserId": "123e4567-e89b-12d3-a456-426614174000",
    "unassignedUser": {
      "id": "80a2b26b-9fb3-42b5-b6dc-126c437cad5d",
      "firstName": "Carla",
      "lastName": "Creative",
      "hasImage": true
    },
    "dueDate": "2024-01-15T09:30:00Z",
    "duration": 1,
    "memberId": "123e4567-e89b-12d3-a456-426614174000",
    "member": {
      "id": "80a2b26b-9fb3-42b5-b6dc-126c437cad5d",
      "firstName": "Carla",
      "lastName": "Creative",
      "hasImage": true
    }
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.awork.com/api/v1/tasks/taskId/activities"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.awork.com/api/v1/tasks/taskId/activities';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.awork.com/api/v1/tasks/taskId/activities"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.awork.com/api/v1/tasks/taskId/activities")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.awork.com/api/v1/tasks/taskId/activities")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.awork.com/api/v1/tasks/taskId/activities', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.awork.com/api/v1/tasks/taskId/activities");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.awork.com/api/v1/tasks/taskId/activities")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```