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

Assign project role to user

Assigns a project role to a user within a project.

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

2 parameters · 1 body field
project_idstringrequired
The ID of the project to update.
user_idstringrequired
The ID of the user that should receive the project role.

Identifies the project role to assign to the user.

role_idstringrequired
Identifier of the role to assign.

5 status codes
200Project role assigned to the user successfully.
objectstringrequired
Always `user.role`.
Allowed:user.role
userobjectrequired
Represents an individual `user` within an organization.
roleobjectrequired
Details about a role that can be assigned through the public Roles API.
400The request parameters are invalid or the requested operation cannot be performed.
errorobjectrequired
403The caller does not have permission to perform this operation.
errorobjectrequired
Details about the permission error.
404The endpoint is unavailable or a requested resource was not found in this organization or project.
errorobjectrequired
429The request was rejected because a rate limit was exceeded.
errorobjectrequired

Error handling

A 400 is returned: The request parameters are invalid or the requested operation cannot be performed. A 403 is returned: The caller does not have permission to perform this operation. A 404 is returned: The endpoint is unavailable or a requested resource was not found in this organization or project. A 429 is returned: The request was rejected because a rate limit was exceeded.