Delete document files but not metadata

Hello everybody,

to comply with privacy regulations, we need to delete certain documents via the API. However, we only want to delete the actual file (PDF, etc.), but not the metadata, that there was something of a certain type attached. That information is required for statistical analysis.

How is that possible?

Thanks!