POST/organization/projects/{project_id}/users/{user_id}

Update a user's role in a project

Updates a user's role in a project. Use project_id and user_id to identify the project membership, and set role to owner or member when changing the role.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters · 1 body field
project_idstringrequired
The unique identifier of the project.
user_idstringrequired
The unique identifier of the user whose project role to update.

Project user update payload. Set role to owner or member to update the user's project role.

rolestringoptional
`owner` or `member`

5 status codes
200Returns the project user object with the updated role and the user's identifier, name, email, and membership timestamp.
objectstringrequired
The object type, which is always `organization.project.user`
Allowed:organization.project.user
idstringrequired
The identifier, which can be referenced in API endpoints
namestringoptional
The name of the user
emailstringoptional
The email address of the user
rolestringrequired
`owner` or `member`
added_atintegerrequired
The Unix timestamp (in seconds) of when the project was added.
400Returned when the request parameters are invalid or the requested operation cannot be performed.
errorobjectrequired
403Returned when the caller does not have permission to perform this operation.
errorobjectrequired
Details about the permission error.
404Returned when a requested project, user, service account, or API key was not found.
errorobjectrequired
429Returned when too many management requests are made; reduce the request rate and try again later.
errorobjectrequired

Error handling

A 400 is returned when the request parameters are invalid or the operation cannot be performed. A 403 is returned when the authenticated user does not have permission, and a 404 is returned when a requested project, user, service account, or API key is not found. A 429 is returned when management requests exceed the allowed rate; reduce the request rate and try again later.