---
title: "Purge a stored file"
method: DELETE
path: "/v1/files/{fileToken}"
tags: ["Files"]
---

# Purge a stored file

`DELETE /v1/files/{fileToken}`

## Request

- Base URL: `https://sign-api.tvarka.pro`
- URL: `https://sign-api.tvarka.pro/v1/files/{fileToken}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`
  - OAuth 2 (authorization code, authorization URL `https://sign-api.tvarka.pro/oauth/authorize`, token URL `https://sign-api.tvarka.pro/oauth/token`, scopes: `sign.read`, `sign.signings`)

Drops the bytes. Signings that already referenced the token are
untouched, because they hold their own copy.

## Path parameters

- `fileToken` string, uuid, required

## Response `200`

The file, now purged.

- StoredFile
  - `fileToken` string, uuid
  - `name` string
  - `mediaType` string
  - `sha256` string
  - `bytes` integer
  - `createdAt` string, date-time
  - `expiresAt` string, date-time: An unreferenced upload is not kept forever just because nobody deleted it. Re-upload after this, or post the bytes inline.
  - `usedCount` integer: How many signings have copied these bytes.

## Other responses

- `401`: An RFC 9457 problem document.
- `402`: An RFC 9457 problem document.
- `403`: An RFC 9457 problem document.
- `404`: An RFC 9457 problem document.
- `409`: An RFC 9457 problem document.
- `429`: An RFC 9457 problem document.
- `503`: An RFC 9457 problem document.

---

[API](https://skmtc.dev/tvarka/apis/tvarka-sign-api.md) · [All operations](https://skmtc.dev/tvarka/apis/tvarka-sign-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tvarka/apis/tvarka-sign-api/revisions/e3fdd995c013?raw)
