---
title: "Delete a file or directory of a hosted project"
method: DELETE
path: "/api/v0/desk/projects/{project_id}/file"
tags: ["Desk"]
---

# Delete a file or directory of a hosted project

`DELETE /api/v0/desk/projects/{project_id}/file`

## Request

- Base URL: `https://api.outerport.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.outerport.com/api/v0/desk/projects/{project_id}/file`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/outerport/apis/outerport-api/docs/api/v0/desk/projects/:project_id/file/delete.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `project_id` string, uuid, required

## Query parameters

- `path` string, required: Path relative to the project root.
- `expected_sha256` string, nullable: The file's hash as the caller read it: the delete is refused (409, with the current hash) when the file changed since.

## Response `200`

Successful Response

- DeskProjectEntryResponse: The path an operation left behind, the hash it holds, and the revision it moved the project to.
  - `path` string, required
  - `revision` integer, required
  - `sha256` string, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-26** `07854361a13b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/outerport/apis/outerport-api/changes/api/v0/desk/projects/:project_id/file/delete.md)

---

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