Ingestion API
User Profiles
Manage user profile data and properties
POST
User Profiles
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.
User Profiles
User profiles store persistent information about your users. Use the Engage API to create and update user profiles with various operations.Base URL
Authentication
User profile updates use your project token for authentication.Set Property
Set one or more properties on a user profile. Creates the profile if it doesn’t exist, or updates existing properties.If set to
1, uses the request IP for geolocationEnable strict mode for validation
Return detailed response instead of
1 or 0Request Body
Your project token
The unique identifier for the user
Object containing property names and values to set
Example
Set Property Once
Set properties only if they don’t already exist. Useful for properties like “First Login Date” or “Signup Source”.Request Body
Your project token
The unique identifier for the user
Object containing properties to set only if they don’t exist
Example
Increment Numerical Property
Increment or decrement numerical properties. Use negative values to decrement.Request Body
Your project token
The unique identifier for the user
Object with property names and numerical values to add. Use negative values to subtract.
Example
If the property doesn’t exist, it will be created and set to the specified value (adding to 0).
Union To List Property
Add values to a list property, ensuring each value appears only once.Request Body
Your project token
The unique identifier for the user
Object with property names and arrays of values to add
Example
Append to List Property
Append values to a list property. Unlike union, this allows duplicate values.Request Body
Your project token
The unique identifier for the user
Object with property names and values to append
Example
Remove from List Property
Remove specific values from a list property.Request Body
Your project token
The unique identifier for the user
Object with property names and values to remove
Example
Delete Property
Permanently remove properties from a user profile.Request Body
Your project token
The unique identifier for the user
Array of property names to delete
Example
Delete Profile
Permanently delete a user profile and all its properties.Request Body
Your project token
The unique identifier for the user
Set to empty string or null (value is ignored)
Set to
true to delete only this specific distinct_id without following alias chainsExample
Batch Update
Send multiple profile updates in a single request. You can mix different operations.Example
Reserved Properties
Mixpanel reserves certain property names (prefixed with$) for special purposes:
| Property | Description |
|---|---|
$email | User’s email address |
$name | User’s full name |
$first_name | User’s first name |
$last_name | User’s last name |
$phone | User’s phone number |
$avatar | URL to user’s avatar image |
$created | Profile creation time (set automatically) |
$last_seen | Last activity time (set automatically) |
You can use custom properties alongside reserved properties. Just avoid using the
$ prefix for your custom properties.Best Practices
Use $set_once for immutable properties
Use $set_once for immutable properties
Properties like signup date or first referrer should use
$set_once to prevent overwriting:Batch profile updates
Batch profile updates
Update multiple profiles in a single request for better performance:
Use appropriate data types
Use appropriate data types
- Numbers for metrics:
"credits": 100 - Strings for categories:
"plan": "premium" - Lists for collections:
"interests": ["tech", "gaming"] - ISO dates for timestamps:
"last_purchase": "2024-01-15T10:30:00Z"
Keep list properties manageable
Keep list properties manageable
Avoid storing thousands of items in list properties. Consider:
- Using counts instead of full lists
- Storing only recent items
- Moving historical data to events
User Profiles