---
title: "Delete a file (trash or purge)"
method: DELETE
path: "/api/v1/files/{uuid}"
tags: ["Files"]
---

# Delete a file (trash or purge)

`DELETE /api/v1/files/{uuid}`

## Request

- Base URL: `https://everypage.co`
- URL: `https://everypage.co/api/v1/files/{uuid}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://everypage.co/oauth/authorize`, token URL `https://everypage.co/oauth/token`, scopes: `files:write`)

Delete a file you own (scope `files:write`; UUID or short id). On Basic/Pro the file goes to the trash - restorable in the web app for 7 days (Basic) or 30 days (Pro), its short id and slug still reserved - and the response reports `trashed: true` with `trashedAt`/`purgeAt`. Free plans hard-delete immediately (`trashed: false`). `?purge=1` forces an immediate hard delete on any plan, from the trash or straight past it. Deleting an already-trashed file again is a 200 no-op that repeats its trash state. An active file owned by someone else answers 403; a trashed file owned by someone else, or an unknown id, answers 404.

## Query parameters

- `purge` '1'

## Response `200`

Trashed, or hard-deleted (see `trashed`)

- DeleteResult
  - `trashed` boolean, required: True when the file went to (or was already in) the trash; false after a hard delete (Free plan, or `?purge=1`).
  - `trashedAt` string, date-time: When the file entered the trash. Present only when `trashed` is true.
  - `purgeAt` string, date-time: When the trash sweep will hard-delete it: `trashedAt` + 7 days (Basic) or 30 days (Pro). Present only when `trashed` is true.

## Other responses

- `401`: No or invalid API key, OAuth token, manage token or claim token (code `missing_token` or `invalid_token`).
- `403`: The file is active and belongs to another account (code `forbidden`).
- `404`: Unknown id, or a trashed file that is not yours (code `not_found`).
- `429`: Over the limit - 120 requests per minute per Authorization value on /api/v1 (webhook test 10/min; the Canva lane 30/min per IP). Code `rate_limited`; wait for `Retry-After`.

---

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