---
title: "Delete a file"
method: DELETE
path: "/matters/{matterId}/documents/files/{fileId}"
tags: ["Files"]
---

# Delete a file

`DELETE /matters/{matterId}/documents/files/{fileId}`

## Request

- Base URL: `https://api.smokeball.com`
- URL: `https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}`
- Auth: API key in header `x-api-key` and API key in header `Authorization`

Deletes a specified matter file.

## Path parameters

- `matterId` string, uuid, required
- `fileId` string, uuid, required

## Response `202`

When request is accepted. Returns a 'Link' object.

- Link
  - `id` string, nullable
  - `href` string, nullable
  - `relation` string, nullable
  - `method` string, nullable

## Other responses

- `400`: When a supplied id is not a valid GUID, or when the file does not belong to the specified matter.
- `403`: When the requested file does not belong to the account making the request.

## Changes

- **2026-08-26** `db1b8a86b58e`: 1 breaking, 5 warning
  - the response's body type changed from `object` to `string` for status `400`
  - removed the optional property `detail` from the response with the `400` status
  - removed the optional property `instance` from the response with the `400` status
  - removed the optional property `status` from the response with the `400` status
  - …2 more

[Operation history](https://skmtc.dev/smokeball/apis/smokeball-api/changes/matters/:matterId/documents/files/:fileId/delete.md)

---

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