The company object
Companies represent organizational units in your system. They can be used to group users, manage permissions, and orchestrate user flows based on company-specific conditions.
Overview
Companies serve as organizational containers that group users together. In a business context, companies can represent:
- Organizations
- Teams
- Departments
- Business units
Companies support custom attributes and can be associated with events, enabling sophisticated flow orchestration based on:
- Company-wide metrics and conditions
- User behavior patterns within the company
- Cross-company relationships and hierarchies
Object structure
Unique identifier for the company. Must match the company’s ID in your system. We recommend using a consistent prefix (e.g., comp_
) for better identification.
String representing the object’s type. Always set to "company"
.
A map of company-specific attributes. You can store any custom data to describe the company, such as:
- Company metadata (name, industry, size)
- Business metrics (revenue, employee count)
- Custom flags and settings
ISO 8601 timestamp in UTC indicating when the company was created in the system. For tracking when the company was created in your application, use a custom attribute like company_created_at
in the attributes object.
An array of membership objects representing user-company relationships. Each membership can store custom attributes that describe the relationship between the user and company (e.g., join date, status, preferences). The field defaults to null
but can be expanded using:
?expand=memberships
to include basic membership data?expand=memberships.user
to include both membership and user details
An array of user objects representing all members of this company. Use this field when you only need user data without membership attributes. The field defaults to null
but can be expanded using ?expand=users
.