---
title: "Delete File"
method: DELETE
path: "/projects/{projectId}/files/{fileId}"
tags: ["Source Files"]
---

# Delete File

`DELETE /projects/{projectId}/files/{fileId}`

## Request

- Base URL: `https://api.crowdin.com/api/v2`
- URL: `https://api.crowdin.com/api/v2/projects/{projectId}/files/{fileId}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/docs/projects/:projectId/files/:fileId/delete.ts> (a function with typed inputs; its response is checked against the schema)

**Required scopes:** `project.source.file` (Read and Write).

## Path parameters

- `projectId` integer, required
- `fileId` integer, required

## Headers

- `Prefer` string

## Response `202`

Accepted for asynchronous processing (when `Prefer: respond-async` is sent)

- NodeDeleteResource: Base schema of resource container. Container is a wrapper object that contains payload in required `data` property and provides space for adding any other metadata.
  - `data` NodeDeleteResponseModel, required
    - `identifier` string
    - `status` 'created' | 'in_progress' | 'finished' | 'failed'
    - `progress` integer: in percentages
    - `attributes` union: The deleted node identifier, keyed by resource type.
      - object
        - `branchId` integer, required
      - object
        - `directoryId` integer, required
      - object
        - `fileId` integer, required
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `startedAt` string, date-time
    - `finishedAt` string, date-time
    - `error` object: Only present when the operation failed with a user-actionable reason.
      - `message` string

## Other responses

- `204`: File was successfully deleted
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Project or file with specified id was not found
- `405`: Method Not Allowed
- `409`: Conflict
- `500`: Internal Server Error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2.md) - [All operations](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/revisions/dc68744c5384?raw)
