The OrganizationUser object represents the membership relationship between a user and an organization, including their role and status within that organization.
id string required
Unique organization-user relationship identifier. Format: ogu_ followed by 12 alphanumeric characters.
organization_id string required
Reference to the Organization this membership belongs to.
user_id string required
Reference to the User who is a member of the organization.
role_id string required
Reference to the Role assigned to the user in this organization.
status_id string required
Reference to the UserStatus of the user in this organization.
joined_at string required
Timestamp when the user joined the organization. Format: ISO 8601 datetime string.
is_deleted boolean required
Soft delete flag. When true, the user is removed from the organization but the record is preserved for audit purposes. Default: false.
OrganizationUser records are created when:
- A user creates a new organization (automatically assigned as owner)
- A user is invited to an organization
- A user is auto-assigned based on email domain matching
- An admin manually adds a user to an organization
The relationship supports:
- Multi-organization membership: Users can belong to multiple organizations
- Role-based access control: Different roles per organization
- Status tracking: Active, inactive, invited, etc.
- Soft deletion: Preserves audit trail when users leave