Update user roles in a project
PUT
/api/v1/organizations/{organizationId}/projects/{projectId}/members/{userId}
const url = 'https://localhost:8080/api/v1/organizations/example/projects/example/members/example';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"roles":["project_owner","implementer"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://localhost:8080/api/v1/organizations/example/projects/example/members/example \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "roles": [ "project_owner", "implementer" ] }'Replace the project roles assigned to a user, upserting the assignment when needed
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” organizationId
required
string
Organization ID (integer)
projectId
required
string
Project ID (integer)
userId
required
string
User ID (UUID)
Request Body
Section titled “Request Body ”Updated roles
Media type application/json
object
roles
Array<string>
Example
[ "project_owner", "implementer"]Responses
Section titled “ Responses ”User roles updated successfully
Media type application/json
object
assignedAt
string
organizationId
integer
projectId
integer
roles
Array<string>
status
string
userId
string
Example generated
{ "assignedAt": "example", "organizationId": 1, "projectId": 1, "roles": [ "example" ], "status": "example", "userId": "example"}Invalid request
Media type application/json
object
error
string
error_description
string
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Unauthorized
Media type application/json
object
error
string
error_description
string
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Forbidden - requires Organization Owner or Project Owner role
Media type application/json
object
error
string
error_description
string
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Internal server error
Media type application/json
object
error
string
error_description
string
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}