Guides
Organizations

Organizations & Multi-Tenancy

Optare is designed around the concept of Organizations. This is the fundamental unit of multi-tenancy in our platform.

The Data Model

  • User: An individual identity (e.g., john@example.com).
  • Organization: A group of users (e.g., Acme Corp).
  • Member: The link between a User and an Organization, carrying a Role.

A single User can belong to multiple Organizations with different roles in each.

Roles & Permissions

We provide a flexible RBAC (Role-Based Access Control) system:

RoleDescription
OwnerFull access to the organization, including billing and deletion.
AdminCan manage members and integrations.
MemberStandard access to application features.
ViewerRead-only access.

Switching Organizations

When a user logs in, they have an Active Organization. All API requests are scoped to this active organization.

// Switch the active organization for the current session
await auth.organization.switch('org_123');