> 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 the users' workloads per day.

GET https://api.awork.com/api/v1/users/workload

Returns the users' workloads per day. Takes into consideration weekly availability, absences, user capacity, planned efforts, as well as project budget.The user must be an admin or have `user-planning-data:read` permissions.

Reference: https://developers.awork.com/apiv1/workload/get-users-workload

## Authentication

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

## Request

### Query parameters

- `userIds` (string, required) — The ids of the users to get the workload for, as a comma-separated list of Guids.
- `intervalStart` (string, required) — The start of the interval to filter by.
- `intervalEnd` (string, required) — The end of the interval to filter by.
- `roughPlanningFrom` (integer, required) — The number of days from today when the rough planning should start.
- `fetchDetails` (boolean, optional, default: false) — (Optional - default: false) If set to true, the result will contain the hierarchy of elements that are contributing to the workload (projects, tasks, appointments). Otherwise it will return only the workload value. Works only for single day queries.
- `ignoreCalendarEvents` (boolean, optional, default: false) — Whether to ignore calendar events. Can significantly improve performance.

## Response

### 200

OK

- `list of GetWorkloadForUsersResult`

## 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.

## Types

### GetWorkloadForUsersResult

- `userId` (string, optional)
- `workloads` (list of WorkloadModel, optional, nullable)

### 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.

### WorkloadModel

- `date` (string, optional) — The date of the calculated utilisation.
- `duration` (float, optional) — The total duration (in seconds) of all the items included in the user's workload calculation: Calendar events + Scheduled Tasks + Assigned Tasks + Time Bookings + Recurring Tasks.
- `userCapacity` (integer, optional, nullable) — The total capacity of the user on this day.
- `remainingUserCapacity` (integer, optional, nullable) — The remaining capacity of the user on this day.
- `projects` (list of WorkloadProjectInfo, optional, nullable)
- `tasks` (list of WorkloadTaskInfo, optional, nullable)
- `appointments` (list of WorkloadAppointments, optional, nullable)
- `calendarAbsences` (list of WorkloadAppointments, optional, nullable) — Calendar out-of-office entries grouped by calendar that reduce capacity for this day. Only returned when fetchDetails is enabled.

### WorkloadProjectInfo

- `id` (string, optional)
- `name` (string, optional, nullable)
- `company` (WorkloadCompany, optional)
- `tasks` (list of WorkloadTaskInfo, optional, nullable)
- `timeBookings` (list of WorkloadTimeBookingInfo, optional, nullable)
- `isAnonymized` (boolean, optional, nullable) — This will be true if the user doesn't have access to the project. In that case the Name and the ClientName will be shadowed.
- `hasImage` (boolean, optional)

### WorkloadTaskInfo

- `id` (string, optional)
- `name` (string, optional, nullable)
- `duration` (integer, optional) — The duration of the planned effort of the user for this task. Includes the duration of recurring tasks if the IsRecurring flag is set to true.
- `taskStatus` (WorkloadStatusModel, optional)
- `taskSchedules` (list of WorkloadTaskScheduleInfo, optional, nullable)
- `isAnonymized` (boolean, optional, nullable) — This will be true if the user doesn't have access to the task. In that case the Name and the Status will be shadowed.
- `isRecurring` (boolean, optional) — Whether the task has a recurrency rule.

### WorkloadAppointments

- `providerName` (string, optional, nullable)
- `calendarName` (string, optional, nullable)
- `duration` (integer, optional)

### WorkloadCompany

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

### WorkloadTimeBookingInfo

- `id` (string, optional)
- `description` (string, optional, nullable)
- `duration` (integer, optional)
- `isAnonymized` (boolean, optional, nullable) — This will be true if the user doesn't have access to the project of time booking (if related to a project). In that case the Description will be shadowed.

### WorkloadStatusModel

- `id` (string, optional)
- `name` (string, optional, nullable) — The name of the entity.
- `type` (string, optional, nullable) — The type of the status.

### WorkloadTaskScheduleInfo

- `duration` (integer, optional)
- `from` (string, optional)
- `to` (string, optional)

## Examples

**Response**

```json
[
  {
    "userId": "123e4567-e89b-12d3-a456-426614174000",
    "workloads": [
      {
        "date": "2024-01-15T09:30:00Z",
        "duration": 1.1,
        "userCapacity": 1,
        "remainingUserCapacity": 1,
        "projects": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "name": "string",
            "company": {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "name": "string",
              "hasImage": true
            },
            "tasks": [
              {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "name": "string",
                "duration": 1,
                "taskStatus": {
                  "id": "123e4567-e89b-12d3-a456-426614174000",
                  "name": "Website Design and Implementation",
                  "type": "string"
                },
                "taskSchedules": [
                  {
                    "duration": 1,
                    "from": "2024-01-15T09:30:00Z",
                    "to": "2024-01-15T09:30:00Z"
                  }
                ],
                "isAnonymized": true,
                "isRecurring": true
              }
            ],
            "timeBookings": [
              {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "description": "string",
                "duration": 1,
                "isAnonymized": true
              }
            ],
            "isAnonymized": true,
            "hasImage": true
          }
        ],
        "tasks": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "name": "string",
            "duration": 1,
            "taskStatus": {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "name": "Website Design and Implementation",
              "type": "string"
            },
            "taskSchedules": [
              {
                "duration": 1,
                "from": "2024-01-15T09:30:00Z",
                "to": "2024-01-15T09:30:00Z"
              }
            ],
            "isAnonymized": true,
            "isRecurring": true
          }
        ],
        "appointments": [
          {
            "providerName": "string",
            "calendarName": "string",
            "duration": 1
          }
        ],
        "calendarAbsences": [
          {
            "providerName": "string",
            "calendarName": "string",
            "duration": 1
          }
        ]
      }
    ]
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.awork.com/api/v1/users/workload"

querystring = {"intervalEnd":"intervalEnd","intervalStart":"intervalStart","roughPlanningFrom":"1","userIds":"123e4567-e89b-12d3-a456-426614174000,223e4567-e89b-12d3-a456-426614174001"}

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

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

print(response.json())
```

```javascript
const url = 'https://api.awork.com/api/v1/users/workload?intervalEnd=intervalEnd&intervalStart=intervalStart&roughPlanningFrom=1&userIds=123e4567-e89b-12d3-a456-426614174000%2C223e4567-e89b-12d3-a456-426614174001';
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/users/workload?intervalEnd=intervalEnd&intervalStart=intervalStart&roughPlanningFrom=1&userIds=123e4567-e89b-12d3-a456-426614174000%2C223e4567-e89b-12d3-a456-426614174001"

	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/users/workload?intervalEnd=intervalEnd&intervalStart=intervalStart&roughPlanningFrom=1&userIds=123e4567-e89b-12d3-a456-426614174000%2C223e4567-e89b-12d3-a456-426614174001")

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/users/workload?intervalEnd=intervalEnd&intervalStart=intervalStart&roughPlanningFrom=1&userIds=123e4567-e89b-12d3-a456-426614174000%2C223e4567-e89b-12d3-a456-426614174001")
  .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/users/workload?intervalEnd=intervalEnd&intervalStart=intervalStart&roughPlanningFrom=1&userIds=123e4567-e89b-12d3-a456-426614174000%2C223e4567-e89b-12d3-a456-426614174001', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.awork.com/api/v1/users/workload?intervalEnd=intervalEnd&intervalStart=intervalStart&roughPlanningFrom=1&userIds=123e4567-e89b-12d3-a456-426614174000%2C223e4567-e89b-12d3-a456-426614174001");
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/users/workload?intervalEnd=intervalEnd&intervalStart=intervalStart&roughPlanningFrom=1&userIds=123e4567-e89b-12d3-a456-426614174000%2C223e4567-e89b-12d3-a456-426614174001")! 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()
```