# File expiration period

#### What are the media and file retention conditions in Whapi.Cloud?

Whapi.Cloud allows you to receive texts and files directly from your application without storing them on our servers. You can receive media files via webhook or HTTP request. In the response, these files are assigned a unique identifier known as `MediaID`.

{% hint style="info" %}
You can get direct links to media files. More details on how to do this are described in the "[Setting Auto Download](/help-desk/account/setting-auto-download.md)" guide!
{% endhint %}

At the same time, all media files that are received or uploaded via API HTTP requests to [/media](https://whapi.readme.io/reference/uploadmedia) (`GET` or `POST`) are stored for 30 days. After this 30-day period, files such as audio, PDFs, images, and others are automatically deleted from storage.

Media files received through our API are stored for 30 days, during which you can manage or delete them as needed. This gives you full control over the data, which is especially important for complying with data protection laws.

To delete a file from cloud storage, you can use the method: [Delete media](https://whapi.readme.io/reference/deletemedia).

{% hint style="success" %}
**In summary**

* If you [upload a media](https://whapi.readme.io/reference/uploadmedia) file through our API, or [retrieve a media](https://whapi.readme.io/reference/getmedia) file or its link via the API, the file with its unique MediaID will be stored for 30 days.
* If you don’t access the media file via the API, for example by only sending the MediaID received from the webhook, the data remains stored within your phone’s application and will be kept as long as the file is stored on your device.
  {% endhint %}

***

If you need to store media files for a longer period, you will need to implement your own storage system. This will allow you to manage the data according to your own privacy and security policies.

To store files, you can use various technologies such as cloud storage services, databases, or file management systems. Popular options include:

* Amazon S3
* Google Cloud Storage


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.whapi.cloud/help-desk/receiving/file-expiration-period.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
