Ingestion API
User Profiles
Manage user profile data and properties
POST
User Profiles
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.string
If set to
1, uses the request IP for geolocationstring
Enable strict mode for validation
string
Return detailed response instead of
1 or 0Request Body
string
required
Your project token
string
required
The unique identifier for the user
object
required
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
string
required
Your project token
string
required
The unique identifier for the user
object
required
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
string
required
Your project token
string
required
The unique identifier for the user
object
required
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
string
required
Your project token
string
required
The unique identifier for the user
object
required
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
string
required
Your project token
string
required
The unique identifier for the user
object
required
Object with property names and values to append
Example
Remove from List Property
Remove specific values from a list property.Request Body
string
required
Your project token
string
required
The unique identifier for the user
object
required
Object with property names and values to remove
Example
Delete Property
Permanently remove properties from a user profile.Request Body
string
required
Your project token
string
required
The unique identifier for the user
array
required
Array of property names to delete
Example
Delete Profile
Permanently delete a user profile and all its properties.Request Body
string
required
Your project token
string
required
The unique identifier for the user
string
required
Set to empty string or null (value is ignored)
boolean
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:
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