---
title: "Update mainframe file content by ID"
method: PUT
path: "/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files/{fileId}"
tags: ["Build and Configure Mainframe Integration Projects"]
---

# Update mainframe file content by ID

`PUT /v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files/{fileId}`

## Request

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

Updates the content of an existing mainframe file by its unique file ID with new file content.

**Process Overview:**
1. **Request Validation** - Validates file ID and multipart file content
2. **File Content Update** - Updates the file with new multipart content

**Key Features:**
- Replace entire file content in a single operation
- Preserves file metadata and timestamps

**Use Cases:**
- Update script content from file
- Modify configuration files with new versions
- Replace file content without recreating

**Required Permissions:** `replication-pipeline::update` when permission harmonization is enabled; otherwise, `replication-pipeline::manage`.

## Path parameters

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

## Response `204`

File content updated successfully

## Other responses

- `400`: Bad Request - Validation failed due to one of the following reasons: - Invalid project ID - Invalid pipeline ID - Invalid file ID - Missing or empty file content
- `401`: Unauthorized - Authentication required, valid credentials not provided
- `403`: Forbidden - User lacks the required 'replication-pipeline::update' or legacy 'replication-pipeline::manage' permission
- `404`: Not Found - File not found with the given ID or pipeline does not exist
- `500`: Internal Server Error - Server encountered an unexpected condition, such as: - File update operation failure

---

[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)
