---
title: "Rename a project file"
method: PATCH
path: "/api/projects/{id}/files/{fileId}"
---

# Rename a project file

`PATCH /api/projects/{id}/files/{fileId}`

## Request

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

Requires project membership and OAuth scene:write when using OAuth. Preserves ID and storage URL; updates the owning Studio record when applicable.

## Request body

- object
  - `name` 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

---

[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)
