# Roles & Permissions Matrix

Access in OmnyBot is controlled via RBAC (`resource:action`) through **roles**. Each member holds one or more roles, and their effective permissions are the **union** of all assigned roles.

See [Overview & Custom Roles](/workspace-management/roles/) and [Permission Matrix](/workspace-management/permission-matrix/) for step-by-step role management.

## Four System Roles

Every workspace is seeded with 4 immutable system roles (cannot be renamed or deleted):

| Role | System Code | Primary Scope |
| --- | --- | --- |
| **Owner** | `OWNER` | Full control (13/13 permissions), including general settings, roles, billing, and workspace deletion. |
| **Manager** | `MANAGER` | Operations lead (10/13 permissions): members, channels, inbox, AI & KB, CRM, and audit log. |
| **Agent** | `AGENT` | Chat support (3/13 permissions): view channels, read inbox, and reply to messages. |
| **Viewer** | `VIEWER` | Read-only oversight (2/13 permissions): view channels and read inbox conversations. |

:::note[Owner safeguards]
Every workspace must always have at least **1 Owner**. The last Owner cannot leave the workspace or be demoted (`WORKSPACE_LAST_OWNER` / `WORKSPACE_OWNER_CANNOT_LEAVE`). **Delete Workspace** is only visible to accounts with the `OWNER` role.
:::

## Permission Catalog & System Role Matrix

The 13 permissions are organized into **5 groups** under **Settings → Admin → Roles**:

| Group | Permission Key | Description | Owner | Manager | Agent | Viewer |
| --- | --- | --- | :---: | :---: | :---: | :---: |
| **Workspace** | `workspace:manage` | Rename workspace, update logo, general settings (deletion is Owner-only). | ✓ | — | — | — |
| **Workspace** | `member:manage` | Invite/remove members and assign or change roles. | ✓ | ✓ | — | — |
| **Workspace** | `role:manage` | Create, edit, and delete custom roles. | ✓ | — | — | — |
| **Workspace** | `billing:manage` | View plans, usage, invoices, and upgrade subscriptions. | ✓ | — | — | — |
| **Workspace** | `audit:read` | View the workspace activity log (requires **Growth** plan or higher). | ✓ | ✓ | — | — |
| **Connected Channels** | `nick:read:all` | View all connected channels in the workspace. | ✓ | ✓ | ✓ | ✓ |
| **Connected Channels** | `nick:operate` | Reconnect, disconnect, or change proxies on existing channels. | ✓ | ✓ | — | — |
| **Connected Channels** | `nick:connect` | Connect new channels (Zalo, Facebook Fanpage, WhatsApp, Webchat). | ✓ | ✓ | — | — |
| **Connected Channels** | `nick:delete` | Remove channels from the workspace (and manage them in Trash). | ✓ | ✓ | — | — |
| **Inbox** | `inbox:read:all` | View all conversations in the workspace. | ✓ | ✓ | ✓ | ✓ |
| **Inbox** | `inbox:reply` | Send messages, react, and recall messages in the inbox. | ✓ | ✓ | ✓ | — |
| **AI & Knowledge** | `ai:manage` | Configure AI Bots, MCP connections, Knowledge Base, and AI knowledge gaps. | ✓ | ✓ | — | — |
| **CRM & Operations** | `crm:manage` | Legacy/internal permission key retained in the catalog for backend CRM operations. | ✓ | ✓ | — | — |

## Custom Roles & Multi-Role Assignment

- **Custom roles** (**Growth** plan and above): Members with `role:manage` can create custom roles from any subset of the 13 permissions under **Settings → Admin → Roles**. A role currently assigned to members cannot be deleted (`WORKSPACE_ROLE_IN_USE`).
- **Multiple roles per member** (**Scale** plan and above): Assign multiple roles to a single member; effective access is the union of all assigned roles. See [Plans & Limits](/reference/plans-limits/).

## Changing a Member's Role

1. Go to **Settings → Admin → Members** (requires `member:manage`).
2. Locate the member and select their new role(s) (you cannot modify your own role — `WORKSPACE_CANNOT_MODIFY_SELF`).
3. New permissions take effect immediately without signing out.

:::tip[Can't see a menu or button?]
A missing feature is usually caused by a missing RBAC permission or a plan tier gate. See [Missing Features & Access](/troubleshooting/permissions-plan/).
:::