# Object model Everything in Voicebot hangs off a two-level ownership chain. ``` Tenant ← you, as our customer ├── Tenant-level user ← a person who belongs to the tenant itself ├── Trunk ← the voice path to your telephony └── Account ← a unit inside your organisation ├── Account-level user ← a person who belongs to this account ├── Number / Pool ← numbers this account may dial from ├── Scenario ← call flow definition ├── Agent ← a scenario bound to a number and a schedule └── Communication ← one dialable unit: one recipient, one run ``` ## Tenant The top-level container. In a cloud deployment there are many tenants on one installation and they are fully isolated from each other. In an on-premises deployment there is normally one. A tenant is **issued by us**, never self-created. We create the tenant, its first `tenant_admin` and that user’s first key at provisioning, on neither published surface. What a tenant administers across its own accounts lives on the [Tenant API](https://docs.aiva.apifonica.com/api/tenant/) — accounts and their users, the tenant’s own users, and their keys. SIP trunks and feature-flag rules are set by us, on neither published surface. ## Account A unit inside your organisation: a department, a brand, a region or a client of yours. Accounts are where all the day-to-day work happens, and they are the isolation boundary for scenarios, numbers and call data. This is the entity your system mirrors: when a unit appears on your side, an account appears on ours. [POST/v1/t/account](https://docs.aiva.apifonica.com/api/tenant/operations/createaccount/)\ [GET/v1/t/account](https://docs.aiva.apifonica.com/api/tenant/operations/listaccounts/) Caution Account creation is on the **Tenant API**. An account-level key cannot create accounts. That would let a unit create its own siblings. If you get a 403 here, you are holding the wrong key. ## User A person who signs in. Users are scoped: a tenant-level user sees the whole tenant, an account-level user sees one account. A user holds roles, and the roles give permissions. A permission gates the action; scope gates the objects it may touch. [GET/v1/a/user](https://docs.aiva.apifonica.com/api/account/operations/listusers/) Read [Identity and access](https://docs.aiva.apifonica.com/concepts/identity/) for keys and scope, and [Roles and permissions](https://docs.aiva.apifonica.com/concepts/roles-and-permissions/) for what each role lets a user do. ## Working entities | Entity | What it is | Lives on | | -------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | | **Number** | one number Voicebot may dial from or receive on | [Account API](https://docs.aiva.apifonica.com/api/account/operations/listnumbers/) | | **Number pool** | a group of numbers one agent answers on | [Account API](https://docs.aiva.apifonica.com/api/account/operations/listnumberpools/) | | **Scenario** | the call flow: what is said, heard, decided | [Account API](https://docs.aiva.apifonica.com/api/account/operations/getscenarioslist/) | | **Scenario version** | an immutable published snapshot of a scenario | [Account API](https://docs.aiva.apifonica.com/api/account/operations/listscenarioversions/) | | **Agent** | a scenario bound to a gateway: one number, or a pool | [Account API](https://docs.aiva.apifonica.com/api/account/operations/listagents/) | | **Communication** | one dialable unit: one recipient, one run, one row | [Account API](https://docs.aiva.apifonica.com/api/account/operations/listcommunications/) | | **Trunk** | the SIP path between Voicebot and your telephony | set by us — see [Trunks and numbers](https://docs.aiva.apifonica.com/concepts/object-model/#trunks-and-numbers) | ## Trunks and numbers A **number** is a logical record inside Voicebot saying “this identifier belongs to this account”. A **trunk** is the actual signalling path to your carrier. Registering numbers without a working trunk produces a system that accepts every dispatch request and never rings anybody. They are configured by different people at different times. See [phase 1, step 3](https://docs.aiva.apifonica.com/integration/phase-1-onboarding/#step-3--set-up-the-sip-trunk).