# Operations with Specific AssignedRole

This resource lets you work with roles assigned to a user or a group in YouTrack.

Available since YouTrack 2026.1.

|  Resource  |     ```GENERIC /api/assignedRoles/{roleID} ```    |
| --- | --- |
|  Returned entity  |  [AssignedRole](api-entity-AssignedRole.html). For the description of the entity attributes, see [Supported Fields](#AssignedRole-supported-fields) section.  |
|  Supported methods  |      * `POST`: [Update a Specific AssignedRole](#update-AssignedRole-method).    * `GET`: [Read a Specific AssignedRole](#get-AssignedRole-method).    * `DELETE`: [Delete a Specific AssignedRole](#delete-AssignedRole-method).    |

## AssignedRole attributes

Represents a role assigned to a user or a group in a specific scope.

Available since YouTrack 2026.1.

### Attributes

This table describes attributes of the `AssignedRole` 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 assigned role. `Read-only`.  |
|  role  |  [Role](api-entity-Role.html)  |  The role that is assigned.  |
|  scope  |  [AccessScope](api-entity-AccessScope.html)  |  The scope where the role is assigned. Possible values: Global, Organization, or Project.  |
|  holder  |      * [User](api-entity-User.html)    * [UserGroup](api-entity-UserGroup.html)    |  The user or group that holds the role. `Read-only`.  |

## Assign a role to a user or a group

Assign a role to a user or a group.

### Required permissions

For global roles, requires Low-level Admin Write permission.

For organization roles, requires Update Organization permission.

For project roles, requires Update Project permission.

### Request syntax

```GENERIC
POST /api/assignedRoles/{roleID}?{fields}
```

|  {roleID}  |  The database ID of AssignedRole  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of AssignedRole attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |

### Sample 1

#### Sample request

```CURL
https://example.youtrack.cloud/api/assignedRoles?fields=id,role(id,name),scope(id),holder(id)
```

#### Sample request body

```JSON
{
  "scope": {
    "project": {
      "id": "0-2"
    },
    "$type": "ProjectScope"
  },
  "holder": {
    "id": "4-3",
    "$type": "User"
  },
  "role": {
    "id": "131-5"
  },
  "$type": "AssignedRole"
}
```

#### Sample response body

```JSON
{
  "scope": {
    "project": {
      "id": "0-2"
    },
    "$type": "ProjectScope"
  },
  "holder": {
    "id": "4-3",
    "$type": "User"
  },
  "role": {
    "id": "131-5"
  },
  "id": "31-70",
  "$type": "AssignedRole"
}
```

### Sample 2

#### Sample request

```CURL
https://example.youtrack.cloud/api/assignedRoles?fields=id,role(id,name),scope(id),holder(id)
```

#### Sample request body

```JSON
{
  "scope": {
    "project": {
      "id": "0-2"
    },
    "$type": "ProjectScope"
  },
  "holder": {
    "id": "4-35",
    "$type": "NestedGroup"
  },
  "role": {
    "id": "131-5"
  },
  "$type": "AssignedRole"
}
```

#### Sample response body

```JSON
{
  "scope": {
    "project": {
      "id": "0-2"
    },
    "$type": "ProjectScope"
  },
  "holder": {
    "id": "4-35",
    "$type": "NestedGroup"
  },
  "role": {
    "id": "131-5"
  },
  "id": "31-70",
  "$type": "AssignedRole"
}
```

## Read a Specific AssignedRole

Get a specific assigned role.

### Required permissions

Requires Read permission in the scope of the assigned role (Low-level Admin Read, Read Organization, or Read Project).

### Request syntax

```GENERIC
GET /api/assignedRoles/{roleID}?{fields}
```

|  {roleID}  |  The database ID of the assigned role.  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of AssignedRole attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |

### Sample

#### Sample request

```CURL
https://example.youtrack.cloud/api/assignedRoles/31-70?fields=id,role(id,name),scope(id),holder(id)
```

#### Sample response body

```JSON
{
  "role": {
    "name": "Article Reader",
    "id": "28-33",
    "$type": "Role"
  },
  "holder": {
    "id": "24-2",
    "$type": "User"
  },
  "scope": {
    "id": "544-0",
    "$type": "GlobalScope"
  },
  "id": "31-70",
  "$type": "AssignedRole"
}
```

## Revoke a role from a user or a group

Revokes a specific assigned role from a user or a group.

### Required permissions

Requires Update permission in the scope of the assigned role (Low-level Admin Write, Update Organization, or Update Project).

### Request syntax

```GENERIC
DELETE /api/assignedRoles/{roleID}
```

|  {roleID}  |  The database ID of the assigned role.  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of AssignedRole attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |

### Sample

#### Sample request

```CURL
https://example.youtrack.cloud/api/assignedRoles/31-70
```

