Organization
The Organization object represents a company or business account within the platform. Organizations contain service configurations, users, billing, and all business-specific data.
Schema: OrganizationSchema
Source: src/core/account/organization.schema.ts
Attributes​
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | — | — | Unique identifier for the organization |
companyName | string | Yes | — | Organization's legal company name. Minimum 2 characters |
businessVerticalId | enum | null | No | null | Industry classification. See Business Verticals |
metadata | object | No | — | Custom key-value metadata for organization-specific data |
serviceStatus | enum | No | ACTIVE | Current service status. One of ACTIVE, SUSPENDED, or INACTIVE. |
lastServiceStatusChanged | number | null | No | null | Unix timestamp of last status change |
serviceStatusHistory | array | No | null | Complete history of status changes. See OrganizationServiceStatusRecord |
platformEmail | string | null | No | null | Organization's platform contact email |
createdAt | number | — | — | Unix timestamp when created |
updatedAt | number | — | — | Unix timestamp when last updated |
Related Objects​
OrganizationServiceStatusRecord​
Tracks all status changes for an organization over time.
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | — | — | Unique identifier for the status record |
status | enum | Yes | — | Status at the time of this record. One of ACTIVE, SUSPENDED, or INACTIVE. |
previousStatus | enum | null | Yes | — | Status before this change. One of ACTIVE, SUSPENDED, or INACTIVE. |
suspensionType | enum | null | Yes | — | Type of suspension if status is SUSPENDED. One of QUOTA_EXCEEDED, PAYMENT_FAILED, POLICY_VIOLATION, or MANUAL. |
timestamp | number | Yes | — | Unix timestamp when status changed |
reason | string | Yes | — | Explanation for the status change |
changedBy | string | Yes | — | User ID who initiated the change |
isCurrent | boolean | No | true | Whether this is the current active record |
Example​
{
"id": "org_abc123",
"companyName": "Acme Corporation",
"businessVerticalId": "technology",
"serviceStatus": "ACTIVE",
"platformEmail": "admin@acme.com",
"metadata": {
"industry": "SaaS",
"employeeCount": 150
},
"createdAt": 1709856000000,
"updatedAt": 1709856000000
}