---
title: "Save a file to the project drive"
method: PUT
path: "/v1/projects/{id}/drive/{path}"
tags: ["Project drive"]
---

# Save a file to the project drive

`PUT /v1/projects/{id}/drive/{path}`

## Request

- Base URL: `https://api.shardflux.dev`
- URL: `https://api.shardflux.dev/v1/projects/{id}/drive/{path}`
- Auth: HTTP bearer

The request body is the file. Send `Content-Length` and `x-content-sha256` (the lower-case hex SHA-256 of the body); `Content-Type` is stored with it (application/octet-stream: from the extension). Every write is a new version; the same bytes and type already current at the path answer 200 without one. Large files stream through multipart storage. Paths are relative to the project space root (`tasks/t_ab12/evidence/healthz.png`).

## Path parameters

- `id` string, uuid, required
- `path` string, required

## Query parameters

- `conversation_id` string

## Response `200`

Default Response

- object
  - `file` DriveFile, required
    - `project_id` string, uuid, required: UUIDv7, lowercase canonical form.
    - `path` string, required: Relative to the project space root.
    - `sha256` string, required: This version’s bytes; GET …/drive/{path}?sha256=<this> reads exactly this version, also after the path changes.
    - `size` integer, required
    - `content_type` string, required
    - `conversation_id` string, nullable, required: The conversation whose agent wrote this version, when an agent did.
    - `created_at` string, date-time, required: RFC 3339 UTC timestamp with Z.
    - `current` boolean, required: This is the path’s current version (false: a later write or a delete superseded it).

## Other responses

- `201`: Default Response
- `4XX`: Default Response
- `5XX`: Default Response

---

[API](https://skmtc.dev/shardflux/apis/shardflux-api.md) · [All operations](https://skmtc.dev/shardflux/apis/shardflux-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shardflux/apis/shardflux-api/revisions/ea685f7b39c4?raw)
