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

# Retrieve UserRoles

GET https://api.projectmanager.com/api/data/users/roles

Retrieves the list of UserRoles defined within this Workspace.
            
A UserRole is a name for a privilege level granted to a specific User.  The 'Global Admin'
UserRole is granted to the owner of the Workspace, and this UserRole cannot be changed.
You can choose which UserRole applies to a User within your Workspace.

Reference: https://developer.projectmanager.com/api-reference/user-role/retrieve-user-roles

## Authentication

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

## Request

### Headers

- `x-integration-name` (string, optional) — The name of the calling system passed along as a header parameter

## Response

### 200

Success

- `error` (AstroError, optional, nullable) — If the API call failed, this will contain information about the error that occurred.
- `success` (boolean, optional) — True if the API call succeeded; false otherwise.
- `hasError` (boolean, optional) — True if the API call failed.
- `statusCode` (enum, optional) — The HTTP code of the response.
  - Allowed values: `Continue`, `SwitchingProtocols`, `Processing`, `EarlyHints`, `OK`, `Created`, `Accepted`, `NonAuthoritativeInformation`, `NoContent`, `ResetContent`, `PartialContent`, `MultiStatus`, `AlreadyReported`, `IMUsed`, `MultipleChoices`, `MovedPermanently`, `Found`, `SeeOther`, `NotModified`, `UseProxy`, `Unused`, `TemporaryRedirect`, `PermanentRedirect`, `BadRequest`, `Unauthorized`, `PaymentRequired`, `Forbidden`, `NotFound`, `MethodNotAllowed`, `NotAcceptable`, `ProxyAuthenticationRequired`, `RequestTimeout`, `Conflict`, `Gone`, `LengthRequired`, `PreconditionFailed`, `RequestEntityTooLarge`, `RequestUriTooLong`, `UnsupportedMediaType`, `RequestedRangeNotSatisfiable`, `ExpectationFailed`, `MisdirectedRequest`, `UnprocessableEntity`, `Locked`, `FailedDependency`, `UpgradeRequired`, `PreconditionRequired`, `TooManyRequests`, `RequestHeaderFieldsTooLarge`, `UnavailableForLegalReasons`, `InternalServerError`, `NotImplemented`, `BadGateway`, `ServiceUnavailable`, `GatewayTimeout`, `HttpVersionNotSupported`, `VariantAlsoNegotiates`, `InsufficientStorage`, `LoopDetected`, `NotExtended`, `NetworkAuthenticationRequired`
- `data` (list of UserRoleDto, optional) — If the API call succeeded, this will contain the results.

## Types

### AstroError

Information about an error that occurred within the ProjectManager API.

- `technicalError` (string, optional, nullable) — A technical description of the error that occurred. Not suitable for display to end users.
- `additionalErrors` (list of string, optional, nullable) — If additional errors beyond the main error in `Message` occurred, they will be listed here as individual messages.
- `validationErrors` (map from string to list of string, optional, nullable) — This contains a dictionary of validation errors. The key is the name of the field
- `message` (string, optional, nullable) — A description of the error that occurred. If your application has a user interface, show this message to explain what went wrong.

### UserRoleDto

A UserRole is a name for a privilege level granted to a specific User. The 'Global Admin' UserRole is granted to the owner of the Workspace, and this UserRole cannot be changed. You can choose which UserRole applies to a User within your Workspace.

- `id` (string, optional) — The unique identifier of this UserRole.
- `name` (string, optional) — The friendly name of this UserRole.
- `description` (string, optional) — The description of this UserRole.
- `isAdmin` (boolean, optional) — Set to true if this is the default Admin role
- `isCustom` (boolean, optional) — Set to true if this is a custom role (Only supported on Enterprise Plan)
- `isGlobalAdmin` (boolean, optional) — Set to true if this is the default Global Admin role
- `isGuest` (boolean, optional) — Set to true if this is the Guest role
- `isDefault` (boolean, optional) — This is the role that will be assigned to new users by default.
- `permissions` (UserRolePermissionsDto, optional) — Returns the permission setup associated with this UserRole

### UserRolePermissionsDto

The permissions available to the role

- `invitePeople` (UserRolePermissionDto, optional) — Add people to the account
- `editAccountPage` (UserRolePermissionDto, optional) — Edit accounts and billing page
- `editSecurityPage` (UserRolePermissionDto, optional) — Edit role security settings
- `seeHourlyRatesCostsBudgets` (UserRolePermissionDto, optional) — See hourly rates, costs and budgets
- `setTeamHolidays` (UserRolePermissionDto, optional) — Set team holidays
- `editTagsSkillsTeams` (UserRolePermissionDto, optional) — Create and edit tags, skills and teams
- `editTeamTimesheets` (UserRolePermissionDto, optional) — Edit team timesheets
- `approveTimesheets` (UserRolePermissionDto, optional) — Approve timesheets
- `editImportantProjectInfo` (UserRolePermissionDto, optional) — Manage project portfolio
- `seeExportProject` (UserRolePermissionDto, optional) — Ability to export projects
- `seeManageUsers` (UserRolePermissionDto, optional) — Access the Manage Users page
- `manageIntegrations` (UserRolePermissionDto, optional) — Manage integrations
- `createProjectAndProjectGroups` (UserRolePermissionDto, optional) — Create Projects
- `editUsers` (UserRolePermissionDto, optional) — Edit user profiles, roles and emails
- `viewPersonalBoard` (UserRolePermissionDto, optional) — View personal board
- `editAllProjects` (UserRolePermissionDto, optional) — Edit all projects and timesheets
- `changeOwnEmail` (UserRolePermissionDto, optional) — Edit own email address
- `useMcp` (UserRolePermissionDto, optional) — Access work from ChatGPT and Claude via OAuth

### UserRolePermissionDto

The basic permission object

- `description` (string, optional) — The description of the permission
- `value` (boolean, optional) — True if the permission is on
- `canBeModified` (boolean, optional) — If true this permission can be turned on or off for this role. Most roles can have all permissions modified, but some roles have all or some permissions fixed.

## Examples

**Response**

```json
{
  "error": {
    "technicalError": "string",
    "additionalErrors": [
      "string"
    ],
    "validationErrors": {},
    "message": "string"
  },
  "success": true,
  "hasError": true,
  "statusCode": "Continue",
  "data": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "isAdmin": true,
      "isCustom": true,
      "isGlobalAdmin": true,
      "isGuest": true,
      "isDefault": true,
      "permissions": {
        "invitePeople": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "editAccountPage": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "editSecurityPage": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "seeHourlyRatesCostsBudgets": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "setTeamHolidays": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "editTagsSkillsTeams": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "editTeamTimesheets": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "approveTimesheets": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "editImportantProjectInfo": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "seeExportProject": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "seeManageUsers": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "manageIntegrations": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "createProjectAndProjectGroups": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "editUsers": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "viewPersonalBoard": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "editAllProjects": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "changeOwnEmail": {
          "description": "string",
          "value": true,
          "canBeModified": true
        },
        "useMcp": {
          "description": "string",
          "value": true,
          "canBeModified": true
        }
      }
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.projectmanager.com/api/data/users/roles"

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

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

print(response.json())
```

```javascript
const url = 'https://api.projectmanager.com/api/data/users/roles';
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.projectmanager.com/api/data/users/roles"

	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.projectmanager.com/api/data/users/roles")

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.projectmanager.com/api/data/users/roles")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.projectmanager.com/api/data/users/roles', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.projectmanager.com/api/data/users/roles");
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.projectmanager.com/api/data/users/roles")! 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()
```