The OrganizationDomain object represents email domains associated with an organization. Domains enable automatic user assignment when users register with matching email addresses.
id integer required
Unique domain identifier (auto-incrementing integer).
name string required
Domain name (e.g., aitronos.com, example.org). Should not include protocol or subdomain.
organization_id string required
Reference to the Organization this domain belongs to.
is_deleted boolean required
Soft delete flag. When true, the domain is inactive but preserved for audit purposes. Default: false.
created_at string required
Timestamp when the domain was added. Format: ISO 8601 datetime string.
updated_at string required
Timestamp when the domain was last updated. Format: ISO 8601 datetime string.
When a user registers with an email address matching an organization's domain:
- System checks for matching OrganizationDomain records
- If match found, user is automatically added to the organization
- User is assigned the default "member" role
- User status is set to "Active"
User registers with john@aitronos.com:
- System finds OrganizationDomain with
name: "aitronos.com" - User automatically joins the associated organization
- No invitation required
Organizations can have multiple domains:
company.comcompany.orgsubsidiary.com
Users from any of these domains will be auto-assigned to the organization.
- Domain verification should be implemented to prevent unauthorized access
- Consider requiring email verification before auto-assignment
- Admins should be able to disable auto-assignment per domain
- Monitor for suspicious domain registrations