# Delete file

`DELETE /api/file/{hash}`

URL: https://repsona.com/api/delete-file-hash

Deletes a file. Only the uploader can delete it (admin cannot).

## Parameters

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `hash` | path | string | required | Hash of the file (UUID), returned as `hash` when the file was uploaded. |

## Request

```sh
curl -X DELETE "https://<space>.repsona.com/api/file/{hash}" \
  -H "Authorization: Bearer $REPSONA_API_KEY"
```

## Responses

- 200: Deleted
- 401: Authentication is required
- 403: Not the uploader
- 404: File not found

## Example response

```json
{
  "message": "success"
}
```
