Delete API

Note: This documentation is for a BETA feature. Contact Medallia Support or your CSM for more information.

The Delete API will allow you to delete any user properties or historical events and sessions of a user.Keep in mind that if you do not opt-out the user and send any events for that user in the future, the data will be stored. In addition, since Journey Analytics does not control your Aggregation Tables, external data sources or data uploaded through our integrations, it is your responsibility to delete that user from these external tables.

The delete API will be carried out using customer_user_id (the original user_id sent from the event JSON, not the internal user_id Journey Analytics allocates per user). Since Journey Analytics allows you to link between multiple identities of the same user, the Delete API will also delete all the alternative identities of a single user, and their records, and not just the ones received with the user id that asked for the erasure.

The Delete API will queue the user requested for deletion and the Delete Status API will let you know the status of request for deletion (whether it's in progress or done).

Also, since every query in Journey Analytics is calculated based on raw event-level data, once these tasks are completed, the data retrieved from queries on top of Journey Analytics will change and will not include these events and sessions, even when querying aggregated values.

Warning: This action cannot be reversed, please use it wisely!

Method

POST

API End Point

https://app.cooladata.com/api/v2/projects/{projectId}/users/delete

Replace the [project_id] placeholder with your actual Project ID.

Header

ContentType:application/json
Authorization:Token [User_API_Token]

Replace the [User_API_Token] placeholder with your actual user API Token found when clicking on your user in the application. The request will be permitted only for ADMIN user permissions.

Data/Payload

{ "reason":"<reason for deletion>",
 "userIds":
[<an array of comma separated customer user ids for deletion>]
 }

Response

The expected response is 200 OK (no body). If there was an error the body will include the reason for failure.

Sample Request:

[POST]:https://app.cooladata.com/api/v2/projects/113231/users/deleteheaders:Content-Type: application/jsonAuthorization: 07J2FBteX4dfgdfg431yWbO9jghkdfjg45YgfjlkoH3dCPmjbody:{ "reason":"testing delete api", "userIds":["0e00e01b-2691-489c-93ac-74567d9e","4ad45365-7351-4c64-8605-25413dc216c7″,"b24f0b61-d6ce-427f-56g0-c41144504456″]}

response you should get if all is ok is 200 OK

Delete Status API

You can check the status of the delete request with the delete status API:

Method

POST

API End Point

https://app.cooladata.com/api/v2/projects/{projectId}/users/delete/status

Replace the [project_id] placeholder with your actual Project ID.

Header

ContentType:application/json
Authorization:Token [User_API_Token]

Replace the [User_API_Token] placeholder with your actual user API Token found when clicking on your user in the application. The request will be permitted only for ADMIN user permissions.

Data/Payload

[an array of comma separated customer user_ids ] 

Response

{
 "<user_id1>": [
 {
 "status": "<status of request>",
 "deletedEvents": <number of deleted events>,
 "deletedSessions": <number of deleted sessions>,
 "statusUpdateDate": <timestamp of last update in msec>
 }
 ],
"<user id2>": [
{
"status": "<status of request>",
"deletedEvents": <number of deleted events>,
"deletedSessions": <number of deleted sessions>,
"statusUpdateDate": <timestamp of last update in msec>
}
]
}