---
title: "Replace the latest scene graph for a project"
method: PUT
path: "/api/scenes/{id}"
---

# Replace the latest scene graph for a project

`PUT /api/scenes/{id}`

## Request

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

## Path parameters

- `id` string, required

## Request body

- ReplaceSceneRequest
  - `name` string
  - `graph` SceneGraph, required
    - `nodes` object, required: Pascal scene nodes keyed by node id. Runtime-validated with AnyNode.
    - `rootNodeIds` string[], required
    - `collections` object
    - `installedPlugins` string[]
    - `materials` object
  - `thumbnailUrl` string, uri, nullable
  - `expectedVersion` integer

## Response `200`

Scene replaced

- SceneMeta
  - `id` string, required
  - `name` string, required
  - `projectId` string, nullable, required
  - `ownerId` string, nullable, required
  - `thumbnailUrl` string, uri, nullable
  - `version` integer, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `sizeBytes` integer
  - `nodeCount` integer

## Other responses

- `401`: Missing or invalid API key/session
- `404`: Scene or project not found
- `409`: Optimistic concurrency conflict

---

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