---
title: "Delete a file"
method: DELETE
path: "/projects/{project_id}:{branch}/files/{file_id}"
tags: ["Files"]
---

# Delete a file

`DELETE /projects/{project_id}:{branch}/files/{file_id}`

## Request

- Base URL: `https://api.lokalise.com/api2`
- URL: `https://api.lokalise.com/api2/projects/{project_id}:{branch}/files/{file_id}`
- Auth: API key in header `X-Api-Token`

Deletes a file and its associated keys from the project.

**Project Type Compatibility:**
- ❌ **Software projects** (localization_files) - *File deletion not supported for Software projects*
- ❌ **Documents projects** (paged_documents) - *Branching not supported for Documents projects*
- ❌ **Marketing projects** (content_integration, marketing, marketing_integrations) - *Branching not supported for Marketing projects*

**Note:** This endpoint requires branching support, which is only available for Software projects. However, Software projects do not support file deletion. This creates a logical conflict - this endpoint may not be practically usable.

Requires <code>write_files</code> OAuth access scope.

## Path parameters

- `project_id` string, required
- `branch` string, required
- `file_id` number, required

## Response `200`

OK

## Other responses

- `400`: Bad Request - Action not supported by this project type

---

[API](https://skmtc.dev/lokalise/apis/projects-with-branches.md) - [All operations](https://skmtc.dev/lokalise/apis/projects-with-branches/llms.txt) - [OpenAPI document](https://skmtc.dev/lokalise/apis/projects-with-branches/revisions/7ed3f978a361?raw)
