Users & Companies
The Ecosystem module is the foundation of Kanvas. It manages identity, tenancy, and access — users, companies, branches, roles, and permissions. Every other module is scoped to a company.
User
Users are people who access the system — team members, agents, or admins.
| Field | Type | Description |
|---|---|---|
| id | ID! | Unique identifier |
| uuid | String! | Universal unique identifier |
| firstname | String | First name |
| lastname | String | Last name |
| displayname | String | Display name |
| Email! | Email address | |
| is_active | Boolean! | Whether the user is active |
| default_company | Int | ID of the user's primary company |
| default_company_branch | Int | ID of the user's primary branch |
| roles | [Role!] | Assigned roles |
| companies | [Company!] | Companies the user belongs to |
| branches | [CompanyBranch!] | Branches the user has access to |
| photo | Filesystem | Profile photo |
| files | [Filesystem!] | Attached files |
| custom_fields | [CustomField!] | Custom key-value data |
| created_at | DateTime | Creation timestamp |
Company
Companies are the primary tenant boundary. All data is scoped to a company.
| Field | Type | Description |
|---|---|---|
| id | ID! | Unique identifier |
| uuid | String! | Universal unique identifier |
| name | String! | Company name |
| website | String | Website URL |
| address | String | Address |
| String | Contact email | |
| phone | String | Phone number |
| country_code | String | Country code |
| is_active | Boolean! | Whether the company is active |
| users | [User!] | Team members |
| branches | [CompanyBranch!] | Company branches / locations |
| total_users | Int | Total user count |
| total_branches | Int | Total branch count |
| custom_fields | [CustomField!] | Custom key-value data |
Queries
# List users
query {
users(first: 20, where: { column: IS_ACTIVE, operator: EQ, value: true }) {
data {
id displayname email
roles { name }
default_company
}
paginatorInfo { total hasMorePages }
}
}
# List companies
query {
companies(first: 20) {
data {
id uuid name website
total_users total_branches
branches { id name }
}
}
}Mutations
# Update a user
mutation {
updateUser(id: 1, data: { firstname: "Jane", lastname: "Smith" }) {
id displayname
}
}
# Create a company
mutation {
createCompany(input: { name: "New Corp", website: "https://newcorp.com" }) {
id uuid name
}
}
# Create a branch
mutation {
createCompanyBranch(company_id: 1, input: { name: "West Coast Office" }) {
id uuid name
}
}
# Add user to company
mutation {
addUserToCompany(user_id: 5, company_id: 1) { id }
}Roles & Permissions
# List roles
query {
roles(first: 50) {
data { id name abilities { name } }
}
}
# Check permission
query {
can(check: "create-leads")
}