Add permissions to a role without removing existing ones
POST/roles/:roleId/permissions
Adds one or more permissions to the role identified by roleId, leaving any existing permissions intact. Use this when you want to expand a role's permission set without affecting what it already has; to simultaneously add and remove permissions in one call use PATCH /roles/{roleId}/permissions/bulk. Requires the tenant-id header (returns 400 if absent or blank). The request body must include a permissionIds array of permission ID strings; obtain valid permission IDs from the permissions list endpoints. Returns 200 with the complete, updated list of all permissions now assigned to the role — not just the newly added ones. Note: if the role does not exist, the current implementation returns 500 rather than 404 (tracked in CP-36405).
Request
Responses
- 200
- 400
- 401
- 403
- 500
Permissions added successfully
Bad request - Invalid request data or missing required fields
Authentication required - Valid authentication token is missing or invalid
Forbidden - User does not have the required permissions to update role permissions
Internal server error - An unexpected error occurred while processing the request. No response body is returned. Note: a non-existent role ID currently also surfaces here as a 500 rather than a 404, since not-found conditions are not distinguished from other failures (tracked in CP-36405).