The Enterprise tier of Sim Studio is designed for organizations requiring advanced security, fine-grained access control, and scalable subscription management. These features are typically gated by environment variables or specific plan identifiers within the database.
The enterprise suite focuses on four primary pillars:
The following diagram illustrates how enterprise features are gated and resolved within the system, bridging high-level concepts to specific code entities like isEnterprise and isBillingEnabled.
Enterprise Feature Resolution
Sources: apps/sim/lib/billing/plan-helpers.ts18 apps/sim/app/api/organizations/[id]/seats/route.ts:7-16, apps/sim/app/api/workspaces/[id]/byok-keys/route.ts:1-12, apps/sim/app/api/billing/switch-plan/route.ts73-78
Sim Studio supports enterprise identity providers via OIDC and SAML. This allows organizations to manage user lifecycle through external directories like Okta or Microsoft Azure AD.
isSsoEnabled within the subscription core.For implementation details, see Single Sign-On (SSO).
Beyond basic roles (Owner, Admin, Member), enterprise users can utilize Permission Groups to manage access at a granular level.
NEXT_PUBLIC_ACCESS_CONTROL_ENABLED flag and verified via getUserEntityPermissions apps/sim/app/api/folders/route.ts38-46member, organization, and workspace tables to map users to specific capabilities.recordAudit for compliance tracking apps/sim/app/api/folders/[id]/duplicate/route.ts:148-163, apps/sim/app/api/organizations/[id]/route.ts:196-208.For details on the RBAC implementation, see Access Control & Permission Groups.
Enterprise billing is managed through a combination of Stripe integration and internal organization management.
Organizations support complex seat-based structures for teams.
PUT /api/organizations/[id]/seats, which triggers a stripe.subscriptions.update call with proration_behavior: 'always_invoice' apps/sim/app/api/organizations/[id]/seats/route.ts:169-180.orgUsageLimit that is updated when seat counts change apps/sim/app/api/organizations/[id]/seats/route.ts:191-213.The StripeInvoiceWebhooks handler manages the lifecycle of enterprise accounts:
overage_billing and overage_threshold_billing for large-scale users apps/sim/lib/billing/webhooks/invoices.ts27-31addCredits, which updates the creditBalance in the organization table apps/sim/app/api/v1/admin/credits/route.ts157-166Billing Entity Relationship This diagram maps the logical billing flow to the underlying database schema and Stripe integration points.
Sources: apps/sim/lib/billing/webhooks/invoices.ts2-9 apps/sim/app/api/organizations/[id]/seats/route.ts:184-190, apps/sim/app/api/v1/admin/credits/route.ts26-38
For technical integration details, see Billing & Subscription Management.
Enterprise workspaces can provide their own API keys for AI providers (OpenAI, Anthropic, Google, etc.) to bypass platform-level billing and usage limits.
encryptSecret and stored in the workspaceBYOKKeys table apps/sim/app/api/workspaces/[id]/byok-keys/route.ts:149-160.getApiKeyWithBYOK utility checks if a workspace has a valid key before falling back to system keys apps/sim/lib/api-key/byok.ts57-105useUpsertBYOKKey and useDeleteBYOKKey hooks apps/sim/hooks/queries/byok-keys.ts53-110Sources: apps/sim/app/api/workspaces/[id]/byok-keys/route.ts:1-12, apps/sim/lib/api-key/byok.ts20-55 apps/sim/hooks/queries/byok-keys.ts21-45