Add User to Project Team
Use Case
Add users to a project team using YouTrack REST API.
Summary
Starting with YouTrack 2026.1, you can add users to a project team with YouTrack REST API. Project teams are available as the team subresource of a project. Direct team members are managed with the ownUsers subresource.
Before you add a user to a project team, you need to collect the following data:
The entity ID or short name of the target project.
The entity ID of the user that you want to add to the project team.
When you have all necessary entity IDs, you can add the user as a direct member of the target project team by sending a POST request to the following endpoint:
Step-by-Step
To add a user to a project team:
Get the entity ID of the target YouTrack project.
To do so, send
GETrequest to the/api/admin/projectsendpoint, and in thefieldsrequest parameter, listid,shortName, andnameto identify the project. If you know the shortName or name of the target project, you can specify it in thequeryparameter to narrow down the results returned from the server.For example:
curl -L -X GET 'https://example.youtrack.cloud/api/admin/projects?fields=id,name,shortName&query=SP' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cookie: JSESSIONID=node0me8f20cnn11hg7zes33twvmc630.node0'In response, server returned the following data:
[ { "shortName": "SP", "name": "Sample Project", "id": "0-0", "$type": "Project" } ]Get the entity ID of the target YouTrack user.
To do so, send
GETrequest to the/api/usersendpoint, and in thefieldsrequest parameter, listid,login, andnameto identify the user. If you know the login or name of the target user, you can specify it in thequeryparameter to narrow down the results returned from the server.For example:
curl -L -X GET 'https://example.youtrack.cloud/api/users?fields=id,name,login&query=Mad%20Max' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cookie: JSESSIONID=node0mvgm5m4rifm11cxhwzedm6azu621.node0'In response, server returned the following data:
[ { "login": "Mad_Max", "name": "Mad Max", "id": "1-7", "$type": "User" } ]Now that we have entity IDs for both target project and user, we can move to the last step.
Add the user to the project's team.
To do so, you need to send a
POSTrequest to the following YouTrack REST API endpoint:<YouTrack_REST_API_URL>/admin/projects/{projectID}/team/ownUsersIn the payload of the request, specify the user's entity
id.For example:
curl -L -X POST 'https://example.youtrack.cloud/api/admin/projects/0-0/team/ownUsers?fields=id,login,name' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ --data-raw '{"id":"1-7"}'In this sample request, we also specify the
fieldsparameter to confirm the details of the user that was added to the team.In response, server returned the following data:
{ "login": "Mad_Max", "name": "Mad Max", "id": "1-7", "$type": "User" }