---
title: "Upload or replace the current original"
method: PUT
path: "/api/v1/project-blobs/{key}"
tags: ["Projects"]
---

# Upload or replace the current original

`PUT /api/v1/project-blobs/{key}`

## Request

- Base URL: `https://askthegrid.com`
- URL: `https://askthegrid.com/api/v1/project-blobs/{key}`
- Auth: HTTP bearer

Call addProjectFile without content first to prepare a typed document and obtain its file ID and generation. Requires editor access. Send projectId and the file's current generation as fileVersion. Whole requests accept up to 25 MiB. For larger files, use ordered parts of 8 MiB (last part may be smaller), with total size up to 250 MiB. Send part, parts and size on every request; part 0 returns uploadId, required on subsequent parts. Completion publishes the native original, advances its generation when replacing published bytes, clears extraction and queues reading. Read the current file state after completion. No historical bytes are retained. A 409 means reread the file and restart the upload; do not retry stale generations.

## Path parameters

- `key` string, required

## Query parameters

- `projectId` string, required
- `fileVersion` integer, required
- `part` integer
- `parts` integer
- `size` integer
- `uploadId` string

## Response `200`

Part accepted or original published

- object
  - `saved` boolean, required
  - `uploadId` string, uuid
  - `part` integer
  - `parts` integer
  - `size` integer
  - `fileVersion` integer

---

[API](https://skmtc.dev/askthegrid/apis/ask-the-grid-api.md) · [All operations](https://skmtc.dev/askthegrid/apis/ask-the-grid-api/llms.txt) · [OpenAPI document](https://skmtc.dev/askthegrid/apis/ask-the-grid-api/revisions/9cd80115e395?raw)
