---
title: "Delete File"
method: DELETE
path: "/api/v1/files/{fileId}"
tags: ["Files"]
---

# Delete File

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

Delete a file from a workspace. This removes both the file content and its metadata. This action is irreversible.

## Path parameters

- `fileId` string, required

## Query parameters

- `workspaceId` string, required

## Response `200`

File deleted successfully.

- object
  - `success` boolean — Whether the deletion completed successfully.
  - `data` object — Response payload containing the deletion confirmation.
    - `message` string — Human-readable confirmation message.

## Other responses

- `400` — Invalid request parameters. Check the details array for specific validation errors.
- `401` — Invalid or missing API key. Ensure the X-API-Key header is set with a valid key.
- `403` — Access denied. You do not have permission to access this resource. For audit log endpoints, this requires an Enterprise subscription and organization admin/owner role.
- `404` — The requested resource was not found. Verify the ID is correct and belongs to your workspace.
- `429` — Rate limit exceeded. Wait for the duration specified in the Retry-After header before retrying. The X-RateLimit-* headers accompany every response from an authenticated v1 request — success and error alike — and are omitted only when the request fails authentication, since no rate-limit bucket is consulted in that case.

## Changes

> 14 revisions in range; 1 could not be searched.

- **2026-03-14** `86c22a5b6914` — 1 info
  - endpoint added
- **2026-03-02** `f8d20edc8aab` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/simstudioai/apis/sim-api/changes/api/v1/files/:fileId/delete.md)

---

[API](https://skmtc.dev/simstudioai/apis/sim-api.md) · [All operations](https://skmtc.dev/simstudioai/apis/sim-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/simstudioai/sim-api/revisions/66a471c5b1df/schema)
