permissions
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 the owner of the role or have appropriate administrative permissions.
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 doesn’t have permission to assign roles
- 404 Not Found: User or role doesn’t exist
- 500 Internal Server Error: Error adding user to role
POST
Add 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.
Example:
"b2c3d4e5-6717-4562-b3fc-2c963f66afa7"
Response
Successful Response
Previous
Remove User From Role EndpointRemove a user from a role.
The authenticated user must be able to manage users in the tenant.
## Path Parameters
- **user_id** (UUID): The UUID of the user to remove from the role
## Request Parameters
- **role_id** (UUID): The UUID of the role to remove the user from
Next
Add User To Role