---
title: "Delete File/Folder and return its File Action. A pending or processing deletion continues in the background after this returns; check its File Migration for completion. Waiting for the File Migration does not cancel the deletion."
method: POST
path: "/file_actions/delete/{path}"
tags: ["file_actions", "File Actions"]
---

# Delete File/Folder and return its File Action. A pending or processing deletion continues in the background after this returns; check its File Migration for completion. Waiting for the File Migration does not cancel the deletion.

`POST /file_actions/delete/{path}`

## Request

- Base URL: `https://app.files.com/api/rest/v1`
- URL: `https://app.files.com/api/rest/v1/file_actions/delete/{path}`
- Auth: none declared

Delete File/Folder and return its File Action.  A pending or processing deletion continues in the background after this returns; check its File Migration for completion.  Waiting for the File Migration does not cancel the deletion.

## Path parameters

- `path` string, required

## Request body `multipart/form-data`

- object
  - `recursive` boolean: If true, will recursively delete folders. Otherwise, will error on non-empty folders.

## Response `201`

The FileActions object.

- FileActionEntity: FileActionEntity model
  - `status` string: Status of file operation.
  - `file_migration_id` integer: If status is pending, this is the id of the File Migration to check for status updates. Delete actions include it whenever the deletion runs as a File Migration, including while it is processing.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not Allowed
- `409`: Conflict
- `412`: Precondition Failed
- `422`: Unprocessable Entity
- `423`: Locked
- `429`: Too Many Requests

## Changes

> 29 revisions in range; 4 not diffed.

- **2026-10-12** `54234b5cb3fd`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/files/apis/files-com-api/changes/file_actions/delete/:path/post.md)

---

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