---
title: "Delete encrypted file"
method: DELETE
path: "/files/encrypted/{id}"
tags: ["Files Encrypted", "dev-api"]
---

# Delete encrypted file

`DELETE /files/encrypted/{id}`

## Request

- Base URL: `https://gateway.prem.io`
- URL: `https://gateway.prem.io/files/encrypted/{id}`
- Auth: HTTP bearer and API key in header `Authorization`

Permanently delete a specific encrypted file by ID

## Path parameters

- `id` string, required

## Response `200`

Encrypted file deleted successfully

- object
  - `status` 200 | 201 | 202, required: Status code of the response
  - `data` union, required: Response data containing the requested object
    - object
    - unknown[]
      - unknown
  - `error` string, nullable: Error message of the response, human readable
  - `message` string, nullable, required: Success message
  - `env` 'development' | 'production', required: API environment
  - `log` union: Useful informaiton, not always present, to debug the response
    - string
    - object
  - `validator` union: Validator response object, each key is the field name and value is the error message
    - object
    - unknown[]
      - unknown
  - `support_id` string, uuid, nullable: Support ID linked to the response, used to identify it when talking with our team.

## Other responses

- `400`: Bad request
- `401`: Access token is missing or invalid
- `403`: You do not have the required permissions to access this resource
- `404`: Resource not found

## Changes

- **2026-11-13** `d46bc3931b34`: 12 warning
  - added the new `405.00` enum value to the `allOf[subschema #1]/status` response property for the response status `401`
  - added the new `405.00` enum value to the `allOf[subschema #1]/status` response property for the response status `403`
  - added the new `405.00` enum value to the `allOf[subschema #1]/status` response property for the response status `404`
  - added the new `405.00` enum value to the `status` response property for the response status `400`
  - …8 more
- **2026-10-16** `d5b1beb33be5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/premai-io/apis/prem-studio-api/changes/files/encrypted/:id/delete.md)

---

[API](https://skmtc.dev/premai-io/apis/prem-studio-api.md) - [All operations](https://skmtc.dev/premai-io/apis/prem-studio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/premai-io/apis/prem-studio-api/revisions/d46bc3931b34?raw)
