---
title: "Save Workspace File"
method: PUT
path: "/api/projects/{project_id}/workspace/files/{file_path}"
---

# Save Workspace File

`PUT /api/projects/{project_id}/workspace/files/{file_path}`

Save a workspace file (full ``content`` or an ``ops`` batch) with optimistic
concurrency. 409 on a stale ``baseVersion`` or while an agent run holds the lock.

## Path parameters

- `project_id` string, required
- `file_path` string, required

## Request body

- SaveFileRequest
  - `content` string, nullable
  - `ops` object[], nullable
  - `baseVersion` integer, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/latted/apis/motion-graphics-designer-api.md) · [All operations](https://skmtc.dev/latted/apis/motion-graphics-designer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/latted/motion-graphics-designer-api/revisions/36d149b525df/schema)
