POST Deletion Request (JSON)
POST https://amplitude.com/api/2/deletions/users
Request a user be scheduled for deletion using a JSON body. Specify up to 100 users at a time. A mix of Amplitude IDs and User IDs is permitted.
When a request is made, we confirm the validity of the requestor via the secret key and the end-user via the Amplitude ID. To reduce resource impact and ensure high availability, Amplitude batches requests for deletions. Batch jobs are scheduled for 10-13 days after the first request in a batch is made.
Requests in the batch can be revoked until three (3) days before the day the job is scheduled to run. During the three (3) day period, you can't edit batch. All deletion requests made during this time are added to a new batch job.
Following the three (3) day period, the request's status changes to 'submitted', and the batch can't be stopped. The purge process removes all data associated with the user from all Amplitude's systems, including associated recovery and back-up systems. After the job is finished, its status changes to done
.
JSON Body Parameter
The body parameter is required. It is the deletion request object listing the userids and amplitudeids for the users to delete.
key | description |
---|---|
amplitude_ids | Amplitude IDs for the users to delete. |
user_ids | User IDs for the users to delete. |
requester | The internal user who requested the deletion. This is useful for auditing. |
ignore_invalid_id | When true , the job ignores invalid user IDs. Invalid user IDs are users that don't exist in the project. |
delete_from_org | Delete user from the entire org instead of this project only. Can be used only with orgs that have the Portfolio feature enabled. Requests must be by user_ids only. Values can be either True or False . Defaults to False . |
Response Object
The response for a POST request contains the following fields:
key | description |
---|---|
day | The day the deletion job is scheduled to begin |
status | The status of the deletion job |
amplitude_ids and user_ids | List of the amplitude ids to delete |
app | project/app id, only appears when the deletion is done for multiple projects |
RESPONSES
status: OK
[{"amplitude_ids":[{"amplitude_id":356896327775,"requested_on_day":"2022-02-17","requester":"employee@yourcompany.com"}],"app":"360829","day":"2022-03-03","invalid_ids":[1000,356896327755,2999],"status":"staging"}]