Add User To Role
Add a user to a role.
This endpoint assigns a user to a specific role, granting them all the permissions associated with that role. The authenticated user must be able to manage users in the role’s tenant, and must hold every capability the role carries: managing users is not a way to reach capabilities the caller was never given. The tenant owner always can.
Path Parameters
- user_id (UUID): The UUID of the user to add to the role
Request Parameters
- role_id (UUID, query): The UUID of the role to assign the user to
Response
Returns a success message indicating the user was added to the role.
Error Codes
- 400 Bad Request: Invalid user or role ID
- 403 Forbidden: User cannot manage users in the tenant, or the role carries a capability the user does not hold
- 404 Not Found: User or role doesn’t exist, or the user is not a member of the role’s tenant
- 409 Conflict: The user already has the role
- 500 Internal Server Error: Error adding user to role
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
UUID of the role to assign. Returned by POST /api/v1/permissions/roles or GET /api/v1/permissions/tenants/{tenant_id}/roles.
"b2c3d4e5-6717-4562-b3fc-2c963f66afa7"
Response
Successful Response