Skip to content
API Now! is currently in closed beta. We are constantly updating these guides as we release updates!

Organization (Semantic Module)

← Back to Modules Reference

The Organization semantic module is used to model multi-tenant systems where resources and user memberships are scoped to specific organizations.

By designating an entity with the Organization semantic, the platform’s Serverless Engine automatically enables organization-level tenancy partitioning, membership validation, and scoped API routing.


AttributeSpecification
ScopeEntity (Applied to a whole table/entity)
Setup LimitAt most one Organization table per Data Domain is allowed
Has ConfigurationYes (via OrganizationConfig)

When configuring the Organization semantic module, you can specify the following parameter:

  • Membership Model (membershipModel): Specifies whether a user can belong to a single organization ('single', default) or multiple organizations ('multiple').

To build a valid multi-tenant schema, the platform enforces the following compile-time rules:

  1. Single Organization Constraint: A domain can contain at most one entity designated with the Organization semantic (e.g., Organization, Company, Tenant, or Workspace).
  2. User Entity Requirement: An Organization entity requires a User entity to exist in the same domain.
  3. Membership Link: The Organization entity must have an association marked with the OrganizationMembers semantic pointing to the User entity.
  4. Membership Roles on Relationship Edge: Member access roles (e.g. owner, admin, editor, viewer) are defined directly on the role property attached to the OrganizationMembers relationship edge (tagged with OrganizationRole), rather than on the Organization entity itself.

To designate an entity as the Organization in the user interface:

  1. Open the Domain Modeler and select the entity representing your organization (or create a new entity, e.g., Organization).
  2. In the entity details panel, locate the Semantic Module dropdown and select Organization.
  3. Configure the tenant settings in the sidebar:
    • Membership Model: Set whether members can belong to a single organization ('single') or multiple ('multiple').
  4. Save your changes.

(UI screenshots of this configuration will be added soon)


The Serverless Engine leverages the Organization semantic to automatically secure nested routes:

  • When accessing a nested path like /orgs/{orgId}/projects/{projectId}/tasks/{taskId}, the engine extracts orgId from the URL parameters.
  • It then verifies that the authenticated user has an active membership link to the organization orgId (validated via the OrganizationMembers association) before allowing access to the target resource.