---
title: "deleteFile"
method: DELETE
path: "/v2/files/{id}"
tags: ["File"]
---

# deleteFile

`DELETE /v2/files/{id}`

Delete a file entity by id

## Path parameters

- `id` union, required
  - string — Empty string (used when file ID not yet assigned)
  - string, uuid — Valid UUID v4

## Query parameters

- `purge` boolean — Provide `true` to permanently delete the file from storage, otherwise it will be soft-deleted
- `activity_id` string, ulid — See https://github.com/ulid/spec
- `strict` boolean

## Response `200`

The deleted file

- FileEntity
  - `_title` string, required
  - `_schema` 'file', required
  - `_org` string, required
  - `_id` union, required
    - string — Empty string (used when file ID not yet assigned)
    - string, uuid — Valid UUID v4
  - `_tags` string[]
  - `_purpose` string[]
  - `_manifest` string[] — Manifest ID used to create/update the entity
  - `filename` string, required
  - `type` 'document' | 'document_template' | 'text' | 'image' | 'video' | 'audio' | 'spreadsheet' | 'presentation' | 'font' | 'archive' | 'application' | 'unknown', required
  - `mime_type` string — MIME type of the file
  - `size_bytes` integer — File size in bytes
  - `readable_size` string — Human readable file size
  - `etag` string — Content hash (S3 ETag) of the latest file version. For single-part uploads this is the hex MD5 of the content and is stable across orgs, so identical content yields an identical etag. Used to detect real content changes without re-downloading the bytes.
  - `access_control` 'private' | 'public-read', required
  - `public_url` string, url — Direct URL for file (public only if file access control is public-read)
  - `custom_download_url` string, uri — Custom external download url used for the file
  - `custom_download_url_auth` 'presigned' | 'token' — Authorization mode for the custom_download_url. `presigned` (the default) uses an HMAC-signed URL; `token` authorizes the download via the caller's bearer token, matched against the exact stored custom_download_url. In token mode the File API returns the unsigned custom_download_url (no expires_at/signature query params) so the stored url matches exactly.
  - `preview_summary_de` string — Compact German summary for hover and list preview surfaces.
  - `short_summary_de` string — Short German paragraph summary for file preview surfaces.
  - `preview_summary_en` string — Compact English summary for hover and list preview surfaces.
  - `short_summary_en` string — Short English paragraph summary for file preview surfaces.
  - `source_url` string — Source URL for the file. Included if the entity was created from source_url, or when ?source_url=true
  - `s3ref` object
    - `bucket` string, required
    - `key` string, required
  - `versions` FileItem[], required
    - `s3ref` S3Ref
      - `bucket` string, required
      - `key` string, required
    - `filename` string
    - `size_bytes` integer
    - `readable_size` string
    - `mime_type` string
    - `etag` string — Content hash (S3 ETag) of this file version
  - `_updated_at` string, date-time
  - `_created_at` string, date-time
  - `_acl` BaseEntityAcl — Access control list (ACL) for an entity. Defines sharing access to external orgs or users.
    - `view` string[]
    - `edit` string[]
    - `delete` string[]
  - `_owners` BaseEntityOwner[]
    - `org_id` string, required
    - `user_id` string
  - `__additional` object, nullable — Additional fields that are not part of the schema

## Other responses

- `401` — Authentication required or invalid credentials
- `403` — Insufficient permissions to access the resource
- `404` — The requested resource was not found
- `500` — An unexpected error occurred on the server

---

[API](https://skmtc.net/epilot/apis/file-api.md) · [All operations](https://skmtc.net/epilot/apis/file-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/epilot/file-api/versions/e4fee5bc1196/schema)
