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
Active Domain
{
"id": 1,
"name": "aitronos.com",
"organization_id": "ORG_A1B2C3D4E5F6G7H8",
"is_deleted": false,
"created_at": "2025-01-10T09:00:00Z",
"updated_at": "2025-01-10T09:00:00Z"
}Multiple Domains for One Organization
[
{
"id": 1,
"name": "aitronos.com",
"organization_id": "ORG_A1B2C3D4E5F6G7H8",
"is_deleted": false,
"created_at": "2025-01-10T09:00:00Z",
"updated_at": "2025-01-10T09:00:00Z"
},
{
"id": 2,
"name": "aitronos.ai",
"organization_id": "ORG_A1B2C3D4E5F6G7H8",
"is_deleted": false,
"created_at": "2025-01-10T09:05:00Z",
"updated_at": "2025-01-10T09:05:00Z"
},
{
"id": 3,
"name": "freddy.ai",
"organization_id": "ORG_A1B2C3D4E5F6G7H8",
"is_deleted": false,
"created_at": "2025-01-10T09:10:00Z",
"updated_at": "2025-01-10T09:10:00Z"
}
]Deleted Domain (Soft Delete)
{
"id": 4,
"name": "old-company.com",
"organization_id": "ORG_A1B2C3D4E5F6G7H8",
"is_deleted": true,
"created_at": "2025-01-05T08:00:00Z",
"updated_at": "2025-01-14T16:45:00Z"
}