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

OrganizationRole (Semantic Module)

← Back to Modules Reference

The OrganizationRole semantic module is applied to the role property attached directly to the OrganizationMembers relationship edge, representing member roles within an organization (e.g. owner, admin, editor, viewer).


AttributeSpecification
ScopeProperty (Applied to a relationship edge attribute)
Data TypeString (configured with an enum list of allowed roles)
Has ConfigurationNo

To build a valid organization role property, the platform enforces the following compile-time rules:

  • Enum Requirement: The property annotated with OrganizationRole defines an enum of allowed roles (e.g. ['owner', 'admin', 'editor', 'viewer']).
  • Relationship Edge Scope: The property must be attached directly to the OrganizationMembers relationship edge.

To define organization roles in the user interface:

  1. Open the Domain Modeler and select the relationship tagged with OrganizationMembers.
  2. Under the relationship edge properties panel, locate the role property (tagged with OrganizationRole).
  3. Enable the property for your API and customize the allowed Enum role options (e.g., owner, admin, editor, viewer).
  4. Save your changes.

When evaluating membership access using the matchOrganization access rule (e.g. enforcing allowedOrgRoles), the Serverless Engine inspects this edge property on the join table to verify whether the authenticated member holds one of the allowed roles for the requested API action.