Ingestion API
Groups
Organize users into groups and manage group properties
POST
Groups
Documentation Index
Fetch the complete documentation index at: https://mintlify.com/mixpanel/docs/llms.txt
Use this file to discover all available pages before exploring further.
Groups
Groups allow you to organize users into entities like companies, accounts, or organizations. Group analytics let you analyze behavior at the group level.Base URL
Authentication
Use your project token for authentication.Set Group Property
Update or add properties to a group profile. Creates the group if it doesn’t exist.Request Body
Your project token
The group key (e.g., “company”, “account_id”)
The unique identifier for this group
Object containing properties to set
Example
Set Group Property Once
Set properties only if they don’t already exist on the group.Request Body
Your project token
The group key
The unique identifier for this group
Properties to set only if they don’t exist
Example
Delete Group Property
Remove specific properties from a group profile.Request Body
Your project token
The group key
The unique identifier for this group
Array of property names to delete
Example
Union To List Property
Add values to a list property, ensuring uniqueness.Request Body
Your project token
The group key
The unique identifier for this group
Object with arrays of values to add
Example
Remove from List Property
Remove specific values from a list property.Request Body
Your project token
The group key
The unique identifier for this group
Object with values to remove
Example
Delete Group
Permanently delete a group profile.Request Body
Your project token
The group key
The unique identifier for this group
Set to empty string (value is ignored)
Example
Batch Update Groups
Update multiple groups in a single request.Example
Linking Users to Groups
To associate users with groups, send events with group properties:The group key (e.g., “company”) must be defined in your project settings under Group Keys before you can use it.
Best Practices
Define group keys in project settings
Define group keys in project settings
Before sending group data, configure your group keys in Project Settings > Group Keys. Common examples:
company: For B2B SaaS productsorganization: For enterprise customersteam: For team-based featuresworkspace: For workspace-based products
Use consistent group identifiers
Use consistent group identifiers
Use the same identifier format across all systems:
Store group-level metrics as properties
Store group-level metrics as properties
Track aggregate information about the group:
Update group properties when they change
Update group properties when they change
Keep group data in sync with your systems:
Common Use Cases
B2B SaaS Company Analytics
Multi-tenant Applications
Groups