llms.txt: machine-readable documentation index. Markdown version of this page is also available.

YouTrack Developer Portal Help

Roles

This resource lets you work with roles in YouTrack.

Available since YouTrack 2026.1.

Resource

/api/roles

Returned entity

Role. For the description of the entity attributes, see Supported Fields section.

Supported methods

Role attributes

Represents a role in YouTrack.

Available since YouTrack 2026.1.

Attributes

This table describes attributes of the Role entity.

  • To receive an attribute in the response from the server, specify it explicitly in the fields request parameter.

  • To update an attribute, provide it in the body of a POST request.

Field

Type

Description

id

String

The database ID of the role. Read-only.

name

String

The name of the role.

description

String

The description of the role. Can be null.

permissions

Array of Permissions

The list of permissions included in the role.

To set or replace the role's permissions, include this attribute in the POST request body. Specify each permission key in a permission object's id attribute.

Read-only.

immutable

Boolean

True for the System Admin role, otherwise false. An immutable role cannot be updated or deleted. Read-only.

Read a List of Roles

Get all roles.

Required permissions

Requires Read permission in at least one scope (Low-level Admin Read, Read Organization, or Read Project), Update Organization, or Admin Read App.

Request syntax

GET /api/roles?{fields}&{$top}&{$skip}&{query}

null

The database ID of Role

Request parameters

Parameter

Type

Description

fields

String

A list of Role attributes that should be returned in the response. If no field is specified, only the entityID is returned.

$skip

Int

Optional. Lets you set a number of returned entities to skip before returning the first one.

$top

Int

Optional. Lets you specify the maximum number of entries that are returned in the response. If you don't set the $top value, the server limits the maximum number of returned entries.

The server returns a maximum of 42 entries for most resources that return collections. For more information, see Pagination.

query

String

Filter roles by permission key with permission:.

For example, permission:JetBrains.YouTrack.READ_ISSUE matches roles that include the Read Issue permission.

This parameter is optional. If you omit it or pass an empty value or only whitespace, the resource applies no search filter.

For operators and examples, see Access Management Query Syntax.

Available since YouTrack 2026.1.

Sample

Find roles that include the Read Issue permission. This request returns up to two matches.

Sample request

curl --get https://example.youtrack.cloud/api/roles \ --data-urlencode query=permission:JetBrains.YouTrack.READ_ISSUE \ --data-urlencode fields=id,name \ --data-urlencode '$top=2' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer <permanent_token>'

Sample response body

[ { "name": "System Admin", "id": "28-1" }, { "name": "Contributor", "id": "28-2" } ]

Add a New Role

Create a new role.

Required permissions

Requires Admin Update App permission.

Request syntax

POST /api/roles?{fields}

null

The database ID of Role

Request parameters

Parameter

Type

Description

fields

String

A list of Role attributes that should be returned in the response. If no field is specified, only the entityID is returned.

Sample

Create an Issue Reader role. The response also includes permissions implied by Read Issue.

Sample request

curl --request POST 'https://example.youtrack.cloud/api/roles?fields=id,name,description,permissions(id),immutable' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer <permanent_token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Issue Reader", "description": "Read issues in assigned scopes.", "permissions": [ { "id": "JetBrains.YouTrack.READ_ISSUE" } ] }'

Sample request body

{ "name": "Issue Reader", "description": "Read issues in assigned scopes.", "permissions": [ { "id": "JetBrains.YouTrack.READ_ISSUE" } ] }

Sample response body

{ "description": "Read issues in assigned scopes.", "immutable": false, "name": "Issue Reader", "permissions": [ { "id": "JetBrains.YouTrack.READ_ISSUE" }, { "id": "jetbrains.jetpass.project-read-basic" } ], "id": "28-33" }
02 November 2026