# Delete User Files from Rev AI **By Ellen Cohen, Head of Sales (Voice) and Vikram Vaswani, Developer Advocate - Jul 26, 2022** ## Introduction At Rev AI, customer [security and privacy](/api/security) are extremely important to us. We believe that users should have the ability to delete their media and transcription data from Rev AI's servers as per their own requirements. To this end, Rev AI offers users three possible approaches to delete their files. This tutorial explains these three approaches. ## Assumptions This tutorial assumes that you have a Rev AI account and access token. If not, [sign up for a free account](https://www.rev.ai/auth/signup) and [generate an access token](/get-started#step-1-get-your-access-token). ## Default policy By default, job data is stored up to a maximum of 30 days. After 30 days, all associated data is deleted and is irretrievable. However, as described below, it is also possible to configure jobs to be deleted earlier than this 30-day maximum. ## Approach 1: Enable automatic job deletion Jobs can be automatically deleted after a specified period. This setting can be enabled by navigating to [your account page](https://www.rev.ai/account) and specifying the auto-deletion period in the *Job Settings* section, as shown below: ![Job deletion setting](/assets/auto-deletion.91f383b2b80c341d2aedef5b160755456869241849a5c0a15be463d7ce90819d.12ef9bb8.png) Once this setting is enabled, Rev AI will delete each job and its associated data shortly after the specified time period elapses. Changes made to this setting will apply only to subsequent jobs and may require up to five minutes to take effect. ## Approach 2: Delete jobs manually after completion Jobs can be deleted by submitting a `DELETE` HTTP request to the API endpoint at `https://api.rev.ai/speechtotext/v1/jobs/`. Replace the `` placeholder with the unique identifier for the job you wish to delete. The request must include your Rev AI access token. Here is an example of a deletion request: ```bash curl -X DELETE "https://api.rev.ai/speechtotext/v1/jobs/" \ -H "Authorization: Bearer " ``` If accepted, all data related to the job, such as input media and transcript, will be permanently deleted and the API will return a `204` status code. A job can only be deleted once completed (either with success or failure). When there are multiple jobs to be deleted, one approach would be to list the job identifiers in a separate file, one per line, and then loop over the file using a script like the one below: ```bash #!/bin/bash while read id; do curl -X DELETE "https://api.rev.ai/speechtotext/v1/jobs/$id" -H "Authorization: Bearer " echo "Job $id submitted for deletion." done " \ -H "Content-Type: application/json" \ -d '{"source_config": {"url": "https://www.rev.ai/FTC_Sample_1.mp3"},"delete_after_s econds":"120"}' ``` Here is an example of a streaming job request: ```bash wss://api.rev.ai/speechtotext/v1/stream?access_token=&content_type=audio/x- raw;layout=interleaved;rate=16000;format=S16LE;channels=1&delete_after_seconds=120 ``` The `delete_after_seconds` query parameter is also supported in other Rev AI APIs. Refer to the [API documentation](/api) for more details. The `delete_after_seconds` query parameter is optional but when provided, it overrides the auto-deletion setting on your Rev AI account. ## Next steps Learn more about Rev AI APIs and their support for data deletion by visiting the following links: - Documentation: Asynchronous Speech-To-Text API [job submission](/api/asynchronous) and [deletion](/api/asynchronous) - Documentation: Streaming Speech-to-Text API [job request with deletion control](/api/streaming/requests#delete-after-seconds) - Documentation: Topic Extraction API [job submission](/api/topic-extraction) and [deletion](/api/topic-extraction) - Documentation: Sentiment Analysis API [job submission](/api/sentiment-analysis) and [deletion](/api/sentiment-analysis) - Documentation: Language Identification API [job submission](/api/language-identification) and [deletion](/api/language-identification) - Rev AI [security and privacy](/api/security)