Skip to content
BotBaseDocs
PricingDashboardStart free
  • Build AI assistants that know your business
  • Quick start
  • Core concepts
  • Create an account
  • Documents
  • Websites
  • Social media posts
  • How answers are grounded
  • Languages
  • Assistant types and plans
  • Create an assistant
  • Personality and instructions
  • Testing your assistant
  • Conversations
  • Leads, forms and human support
  • Booking agent
  • Email replies
  • AI models
  • Website widget
  • Widget appearance and design
  • Chat link and QR code
  • Connect your business platform
  • CRM lead sync
  • Management Agents overview
  • Integration guide
  • Roles and permissions
  • Security model
  • Server and browser API reference
  • Examples by industry
  • Audit log and troubleshooting
  • Developer API overview
  • API keys
  • Chat API reference
  • Errors and limits
  • Plans and the free trial
  • Billing and payments
  • Emails and notifications
  • Security and privacy
  • Troubleshooting
  • Frequently asked questions
Docs/Management Agents/Roles and permissions

Roles and permissions

Model your organisation's own roles, decide what each may do, require confirmations and keep every user inside their own records.

Management Agents·4 min read·Updated 2 Dec 2026

BotBaseX has no built-in roles. Every organisation is different: a school has head teachers and teachers, a pharmacy has pharmacists and cashiers, an office has managers and HR. You define the roles; BotBaseX enforces them.

#How access is decided

For each message, the server works out what the signed-in user may do:

  1. The connection decides which operations exist at all: configured, tested with the current settings, and allowed.
  2. The user's roles decide which of those this person may use. A user with several roles gets the combination of all their roles.
  3. Bindings fix some inputs to the user's own identity.
  4. Confirmation rules decide which operations wait for the user's "yes".

The AI is shown only the result. If it still asks for anything else, for example because a message tried to trick it, the server refuses and records denied in the audit log.

#Creating roles

In Management system → Roles and permissions:

  1. Type a role name and click Add role. The key is generated from the name: Head teacher becomes head_teacher.
  2. Tick the operations the role may use.
  3. Click Save roles.

Your backend must send the same keys when it creates a session:

JSON
{ "user": { "id": "T-17", "name": "Neema Mushi", "roles": ["teacher"] } }
  • Role keys are case-insensitive (Teacher and teacher match).
  • Keys your configuration does not know are ignored. The session response lists them in ignored_roles so you can spot typos.
  • A user with no known role can still chat, but only about your general knowledge. They have no system access.
  • You can have up to 30 roles, and a user can carry up to 20.

#Confirmations

OperationBehaviour
Lookup (GET)Runs straight away, unless a role marks it confirm
Change (POST, PUT, PATCH)Always prepared first; runs only after the user confirms in a later message

Tick confirm under a lookup for sensitive reads, for example salary or medical records, so the user must explicitly ask to open them.

A confirmation:

  • belongs to the user who prepared it. Another user, even with the same role, cannot confirm it;
  • expires after 30 minutes;
  • is re-authorised when confirmed. If you remove the permission in between, it is cancelled;
  • runs once, even if the user says "yes" twice. Each write carries an Idempotency-Key header your API can use to de-duplicate.

#Keeping users inside their own records

Permissions decide which operation a user may call. Bindings decide whose data it returns. Bind an input to the session and the AI can no longer choose it:

Operation inputBound toEffect
my_classes.teacher_iduser.idA teacher only sees their own classes
list_students.school_idattr.school_idStaff of a multi-school group only see their school
branch_sales.branchattr.branchA pharmacy cashier only sees their branch

Attributes come from your server in the session ("attributes": {"school_id": "S-1"}). If a bound value is missing, the operation is refused rather than run without the limit.

Defence in depth

Also check permissions in your own API. Every BotBaseX call includes a signed X-BotBaseX-Actor token with the user id, roles and attributes. See the security model.

#Changing and revoking access

ChangeWhen it applies
Untick an operation for a roleImmediately, from the user's next message
A user's roles change in your systemAt their next session (sessions last 5–60 minutes). To apply at once, revoke their sessions: POST /management/v1/users/{id}/revoke
A staff member leaves or logs outRevoke their sessions the same way
Pause the agentImmediately, for everyone
End one sessionActive sessions → End in the dashboard

#Good practice

  • Start with read-only roles, test them, then add actions.
  • Prefer several narrow operations (get_attendance, get_fee_balance) over one powerful one.
  • Use confirm for anything personal or financial.
  • Test each role with Test as a role, including what it must not be able to do.
PreviousIntegration guideNext Security model

On this page

  • How access is decided
  • Creating roles
  • Confirmations
  • Keeping users inside their own records
  • Changing and revoking access
  • Good practice