kapa.ai how to delete user profile properties
There are several ways to delete user profile properties in Mixpanel:
Using the HTTP API
You can use the $unset operator in Mixpanel's Engage API to remove specific properties from a user profile:
```
[ { "$token": "YOUR_PROJECT_TOKEN", "$distinct_id": "user123", "$unset": ["property_to_delete", "another_property_to_delete"] } ]
LBKSThe `$unset` operator takes a JSON list of string property names and permanently removes those properties and their values from a profile. [Delete Property API](https://github.com/mixpanel/docs/blob/main/reference/Ingestion%20API/user-profiles/profile-delete-property.md)
Using Mixpanel Utils Library
If you're using Python, the mixpanel-utils library provides a convenient people_unset method:
```
mputils.people_unset(['coins','feathers'], query_params={ 'selector' : '(("Albuquerque" in properties["$city"]) and (defined (properties["$city"])))'})
LBKSThis method allows you to unset properties on profiles that match specific criteria. [Mixpanel Utils](https://github.com/mixpanel/mixpanel-utils/blob/master/README.md)
Using SDKs
Various Mixpanel SDKs provide methods to unset properties:
iOS (Swift)
Mixpanel.mainInstance().getGroup(groupKey: "company", groupID: "mixpanel").unset(properties: "employee_count")
iOS (Objective-C)
[[mixpanel getGroup:@โ"company" groupID:@โ"mixpanel"] unset:@โ"employee_count"];
Flutter
mixpanel.getGroup('company','mixpanel').unset('employee_count');
Property Limits
It's worth noting that each User Profile can contain up to 2000 properties. If you're approaching this limit, you can use the $unset operation to remove unnecessary properties. Mixpanel User Profiles FAQ
If you need to delete an entire profile rather than just specific properties, you can use the $delete operator or the people_delete method in the mixpanel-utils library. Deleting Profiles
kapa.ai is still learning and improving, please let me know how I did by reacting below.
โน๏ธย Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
