Skip to content

Update user roles in a project

PUT
/api/v1/organizations/{organizationId}/projects/{projectId}/members/{userId}
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

organizationId
required
string

Organization ID or UUID (bare or urn:uuid)

projectId
required
string

Project ID, UUID (bare or urn:uuid), or slug:my-project

userId
required
string

User UUID (bare or urn:uuid) or did:key

Updated roles

Media type application/json
object
roles
required

At least one project-level role

Array<string>
>= 1 items
Example
[
"project_owner",
"implementer"
]

User roles updated successfully

Media type application/json

A user’s assignment to a single project, and the roles it grants

object
assignedAt
string format: date-time
organizationId
integer
projectId
integer
roles
Array<string>
status
string
userId
string
Example generated
{
"assignedAt": "2026-04-15T12:00:00Z",
"organizationId": 1,
"projectId": 1,
"roles": [
"example"
],
"status": "example",
"userId": "example"
}

Invalid request

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Unauthorized

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

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

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Organization, project, or user not found

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Internal server error

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}