Skip to main content

Assign Role

POST/user-accounts
Give a user a role in your organisation. Roles bundle together permissions, so assigning a role grants all the permissions it contains. A user can have multiple roles if they need different capabilities. This is how you give people access to do things in Backstage.

When to use this

  • Promoting a user to admin
  • Giving someone event management capabilities
  • Adding box office access to an existing user

Request Body

Response

Role assigned successfully

Notes

ℹ️Users can have multiple roles. Permissions are additive-they get everything from all their roles.
💡Check `getMyPermissions` to see the effective permissions after assigning a role.
Code Samples

Assign Role using the TypeScript SDK:

import { BackstageClient } from '@ticketlayer/backstage';

const client = new BackstageClient({
organisationSlug: 'your-org',
});
client.setAccessToken('YOUR_ACCESS_TOKEN');

// Assign Role
const result = await client.role.assignRole({ /* request body */ });

console.log('Operation completed:', result);

Try It

Related