Skip to main content

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

AttributeTypeRequiredDefaultDescription
idstringUnique identifier for the organization
companyNamestringYesOrganization's legal company name. Minimum 2 characters
businessVerticalIdenum | nullNonullIndustry classification. See Business Verticals
metadataobjectNoCustom key-value metadata for organization-specific data
serviceStatusenumNoACTIVECurrent service status. One of ACTIVE, SUSPENDED, or INACTIVE.
lastServiceStatusChangednumber | nullNonullUnix timestamp of last status change
serviceStatusHistoryarrayNonullComplete history of status changes. See OrganizationServiceStatusRecord
platformEmailstring | nullNonullOrganization's platform contact email
createdAtnumberUnix timestamp when created
updatedAtnumberUnix timestamp when last updated

OrganizationServiceStatusRecord

Tracks all status changes for an organization over time.

AttributeTypeRequiredDefaultDescription
idstringUnique identifier for the status record
statusenumYesStatus at the time of this record. One of ACTIVE, SUSPENDED, or INACTIVE.
previousStatusenum | nullYesStatus before this change. One of ACTIVE, SUSPENDED, or INACTIVE.
suspensionTypeenum | nullYesType of suspension if status is SUSPENDED. One of QUOTA_EXCEEDED, PAYMENT_FAILED, POLICY_VIOLATION, or MANUAL.
timestampnumberYesUnix timestamp when status changed
reasonstringYesExplanation for the status change
changedBystringYesUser ID who initiated the change
isCurrentbooleanNotrueWhether 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
}