---
title: "Verify and register uploaded bytes"
method: PUT
path: "/api/projects/{id}/files/uploads"
---

# Verify and register uploaded bytes

`PUT /api/projects/{id}/files/uploads`

## Request

- Base URL: `https://editor.pascal.app`
- URL: `https://editor.pascal.app/api/projects/{id}/files/uploads`
- Auth: HTTP bearer

Supply the original name, MIME type, size, and returned id and storageKey. Verifies stored size and project ownership. Retrying the same id is safe and does not create another catalog entry.

## Request body

- object
  - `name` string, required
  - `mimeType` string, required
  - `size` integer, required
  - `type` 'scan' | 'guide' | 'image' | 'document' | 'other'
  - `source` 'editor' | 'ai_chat' | 'api' | 'import'
  - `id` string, required
  - `storageKey` string, required

## Response `200`

Project file metadata and download URL

- object
  - `file` object, required
    - `id` string, required
    - `projectId` string, required
    - `name` string, required
    - `originalName` string, required
    - `url` string, uri, required
    - `type` 'scan' | 'guide' | 'image' | 'document' | 'other', required
    - `origin` 'upload' | 'plugin' | 'snapshot' | 'render', required
    - `typeLabel` string, nullable
    - `mimeType` string, nullable
    - `fileSize` integer, nullable
    - `thumbnailUrl` string, nullable
    - `notes` string, nullable
    - `tags` string[]
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `400`: Invalid file request
- `401`: Authentication required
- `403`: Missing scene:read or scene:write OAuth scope
- `404`: Project or file not accessible to this workspace member
- `409`: Bytes are not stored yet or file ID is already in use
- `415`: Unsupported file type

---

[API](https://skmtc.dev/pascal/apis/pascal-editor-scene-api.md) · [All operations](https://skmtc.dev/pascal/apis/pascal-editor-scene-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pascal/apis/pascal-editor-scene-api/revisions/08f1f3f41067?raw)
