Tasks represent the smallest unit of work in awork. They are used to break down larger chunks of work, track progress, and collaborate with others.

Types of Tasks

There are two types of tasks: project tasks and private tasks. This is identified by the baseType field in the task object, which can be either projecttask or private.

Project Tasks

Project tasks are tasks that are associated with a project and organized in task lists.

Private Tasks

Private tasks are tasks that are associated with a user and are not visible to other users.

Creating a Task

The following properties are required when creating a task:

Request
1curl -X POST https://api.awork.com/api/v1/tasks \
2 -H 'Content-Type: application/json' \
3 -d '{
4 "name": "My first task",
5 "baseType": "projecttask",
6 "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000",
7 "taskStatusId": "123e4567-e89b-12d3-a456-426614174000",
8 "entityId": "123e4567-e89b-12d3-a456-426614174000"
9 }'

Subtasks

Subtasks have almost the same properties as tasks, but they also have a parentId property that references the parent task. This is how you can create a subtask:

Request
1curl -X POST https://api.awork.com/api/v1/tasks \
2 -H 'Content-Type: application/json' \
3 -d '{
4 "name": "My first task",
5 "baseType": "projecttask",
6 "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000",
7 "taskStatusId": "123e4567-e89b-12d3-a456-426614174000",
8 "entityId": "123e4567-e89b-12d3-a456-426614174000",
9 "parentId": "123e4567-e89b-12d3-a456-426614174000"
10 }'
The subtask has to be in the same project as the parent task.

Learn more about subtasks here.

Checklist Items

Each task comes with a checklist of simple items that can be checked off. This is how you can create a checklist item:

Request
1curl -X POST https://api.awork.com/api/v1/tasks/123e4567-e89b-12d3-a456-426614174000/checklistItems \
2 -H 'Content-Type: application/json' \
3 -d '{
4 "name": "My first checklist item"
5 }'

Learn more about checklists here.

Task Lists

Tasks can be in one or several task lists. This is how you can add a task to a task list or change the list:

Request
1curl -X POST https://api.awork.com/api/v1/tasks/changelists \
2 -H 'Content-Type: application/json' \
3 -d '[
4 {
5 "taskId": "123e4567-e89b-12d3-a456-426614174000",
6 "taskLists": [
7 {
8 "id": "123e4567-e89b-12d3-a456-426614174000"
9 }
10 ]
11 }
12]'