---
title: "Delete one project file"
method: DELETE
path: "/v1/integration/projects/{projectId}/files/{fileId}"
tags: ["Unified Project Lifecycle APIs"]
---

# Delete one project file

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

## Request

- Base URL: `https://integration-adapter.connect.cloud.precisely.com`
- URL: `https://integration-adapter.connect.cloud.precisely.com/v1/integration/projects/{projectId}/files/{fileId}`
- Auth: HTTP bearer

Deletes one project file through the unified project API.

**Features:**
- For Advanced Replication, deletion behavior depends on the file's current phase: a
**draft** file (never committed) is removed immediately and permanently. An **approved**
file (already part of a committed revision) is not removed immediately — instead it is
marked **pending_deletion**, a tombstone that keeps the file visible in historical/committed
revisions until the next commit finalizes the removal, preserving lineage for already-shipped
content. Deleting a file that is already **pending_deletion** is a no-op (idempotent).
- For Mainframe Replication, the file is removed immediately; there is no draft/approved
phase distinction.
- Removes the file from the project's current working set.

**Use Cases:**
- VS Code extension deletes a file from the project explorer.
- User cleans up unused files from a project.

**Authorization:** Requires `replication-pipeline::delete` when permission harmonization is enabled; otherwise, `replication-pipeline::manage`.

## Path parameters

- `projectId` string, required
- `fileId` string, required

## Query parameters

- `projectType` 'REPLICATION' | 'MAINFRAME_REPLICATION' | 'ADVANCED_REPLICATION', required: Supported project types for unified project operations
- `pipelineId` string
- `revisionNumber` integer

## Headers

- `If-Match` string

## Response `204`

Project file deleted

## Other responses

- `400`: Bad Request — the resolved project type does not support files (DI-ADAPTER-PRF-0009)
- `401`: Unauthorized
- `403`: Forbidden — requires replication-pipeline::delete when permission harmonization is enabled, or legacy replication-pipeline::manage otherwise
- `404`: Not Found — project or file does not exist (DI-ADAPTER-PRF-0001)
- `409`: Conflict — the project has a commit in progress, so file operations are temporarily blocked until it finishes (DI-ADAPTER-PRF-0005)
- `412`: Precondition Failed — supplied If-Match does not match the current file (DI-ADAPTER-PRF-0004)
- `500`: Internal Server Error — file deletion failed (DI-ADAPTER-PRF-0002)

---

[API](https://skmtc.dev/precisely/apis/precisely-integration-adapter-service.md) · [All operations](https://skmtc.dev/precisely/apis/precisely-integration-adapter-service/llms.txt) · [OpenAPI document](https://skmtc.dev/precisely/apis/precisely-integration-adapter-service/revisions/2d2629f4987d?raw)
