# Update file

`PUT /workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/files/:path`

Updates a file in the pipeline filesystem and marks it as a static file

**Required Scopes:** `EXECUTION_MANAGE`

## URL Parameters

```typescript
interface URLParameters {
  /** The human-readable ID of the workspace */
  workspace: string; // Example: "my-company"
  /** The human-readable ID of the project */
  project_name: string; // Example: "my-project"
  /** The ID of the pipeline */
  pipeline_id: number; // Example: 123
  /** The path of the file in the pipeline filesystem */
  path: string; // Example: "app/docs/report.pdf"
}
```

## Body Parameters

```typescript
interface BodyParameters {
  /** The Base64-encoded content of the file */
  content: string;
}
```

## Response Body

```typescript
interface ResponseBody {
  /** The state of the operation, `OK` when successful */
  state?: string;
  /** An optional message describing the result of the operation */
  message?: string;
  /** An optional code with additional details of the result */
  code?: number;
}
```

## Request Example

```bash
curl -X PUT "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/files/:path" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "content": "dXBkYXRlZCBjb250ZW50"
}'
```

## Response Example

**Status:** `200 OK`

```json
{
  "state": "OK"
}
```

---
Original source: https://buddy.works/docs/api/pipelines/files/update