Time Tracking

Time Tracking and the resulting Time Entries allow project progress to be tracked and ultimately billed to a client.

How to work with time tracking

Time Tracking in awork is based on Time Entries. Time Entries are created for a specific project and task and are always assigned to a user. There are two ways to create time entries: manually or using the timer.

Creating a time entry manually

There are multiple ways to create time entries. The easiest way is by specifying the startDateUtc and duration. The only other required fields for creating a time entry are the timezone, typeOfWorkId and userId.

Request
1curl -X POST "https://api.awork.com/api/v1/timeentries" \
2 -H "Content-Type: application/json" \
3 -d '{
4 "timezone": "Europe/Berlin",
5 "userId": "123e4567-e89b-12d3-a456-426614174000",
6 "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000",
7 "startDateUtc": "2024-05-14T10:00:00Z",
8 "duration": 3600
9 }'

Alternatively, you can also specify the startDateUtc and endDateUtc fields to create a time entry for a specific time range.

Additionally, you can assign the time entry to a specific project and task by providing the projectId and taskId fields.

Request
1curl -X POST "https://api.awork.com/api/v1/timeentries" \
2 -H "Content-Type: application/json" \
3 -d '{
4 "timezone": "Europe/Berlin",
5 "userId": "123e4567-e89b-12d3-a456-426614174000",
6 "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000",
7 "projectId": "123e4567-e89b-12d3-a456-426614174000",
8 "taskId": "123e4567-e89b-12d3-a456-426614174000",
9 "startDateUtc": "2024-05-14T10:00:00Z",
10 "duration": 3600
11 }'

Using the timer

The timer is a convenient way to track time while working on a task or project. To start the timer, you need to make a request to POST /users/:userId/timetracking/start.

Request
1curl -X POST https://api.awork.com/api/v1/users/123e4567-e89b-12d3-a456-426614174000/timetracking/start \
2 -H "Content-Type: application/json" \
3 -d '{
4 "timezone": "Europe/Berlin",
5 "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000",
6 }'

You can additionally specify the project and task to start the timer for. You can then also pause, resume and stop the timer. There can only be one active timer per user. Timers are automatically stopped after 24h or when the time entry reaches the maximum allowed time for that user and day.

See the Tracking Times for more details on how the timer works.