kapa.ai How can I delete a user profile along with all events associated with it in Mixpanel?
To delete a user profile along with all associated events in Mixpanel, you can use the Ingestion API's delete profile endpoint. Here's how you can do it: 1. Use the POST /engage#profile-delete
endpoint of the Ingestion API.2. Include the following required parameters in your request:
- $token
: Your Mixpanel project token
- $distinct_id
: The unique identifier of the user profile you want to delete
- $delete
: This should be set to null
3. Optionally, you can include $ignore_alias: true
if you have duplicate profiles and want to avoid deleting the original profile when trying to delete a duplicate.Here's an example of how the request body should look: LBKS[ { "$token": "YOUR_PROJECT_TOKEN", "$distinct_id": "user_id_to_delete", "$delete": null } ]LBKS
This will permanently delete the profile from Mixpanel, along with all of its properties and associated event data.It's important to note that this deletion is permanent and cannot be undone. Also, the deletion process may take some time to complete, potentially up to 30 days for full deletion from Mixpanel's systems.For more detailed information on this process, you can refer to the Ingestion API documentation and the User Profiles documentation.
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.
kapa.ai so the correct url is https://api.mixpanel.com/engage#profile-delete or https://api.mixpanel.com/engage
Let me check the knowledge base for you again. One moment! đź“š
Based on the information provided in the knowledge sources, the correct URL for deleting a user profile in Mixpanel is: [https://api.mixpanel.com/engage](https://api.mixpanel.com/engage)
This is supported by the example code provided in the User Profiles documentation, which shows the API endpoint for engaging with user profiles: LBKSresp = [requests.post](http://requests.post)( "[https://api.mixpanel.com/engage](https://api.mixpanel.com/engage)", params={"verbose": "2"}, headers={"Content-Type": "application/json"}, data=json.dumps(profiles) )LBKS
The #profile-delete
part that you mentioned in the first URL is not actually part of the API endpoint. It's likely a reference to the specific operation (profile deletion) within the API documentation, but it's not included in the actual URL when making the API call.When using this endpoint for profile deletion, you would need to include the appropriate parameters in your request body to specify the delete operation, as mentioned in my previous answer. The API will interpret the operation based on the content of your request, not by including it in the URL.
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.