Update Role
PATCH
/roles/{id}Change a role's name, description, or permissions.
Use this to adjust what a role can do. Any users with this role will
immediately get the updated permissions.
You can add or remove individual permissions, or replace the whole list.
When to use this
- Adding new permissions as your app grows
- Tightening security by removing unnecessary access
- Renaming a role to better reflect its purpose
Parameters
idpathrequiredRole ID
Request Body
Response
Role updated successfully
Notes
⚠️Changes affect all users with this role immediately. Double-check before removing permissions.
ℹ️System roles (like "Owner") can't be modified.
Code Samples
Update Role using the TypeScript SDK:
import { BackstageClient } from '@ticketlayer/backstage';
const client = new BackstageClient({
organisationSlug: 'your-org',
});
client.setAccessToken('YOUR_ACCESS_TOKEN');
// Update role
const updated = await client.role.update('{{ROLE_ID}}', {
name: 'Updated Name',
// Add fields to update
});
console.log(`Updated role: ${updated.name}`);