---
title: "Save a scene graph to an existing project or starterProjectId"
method: POST
path: "/api/scenes"
---

# Save a scene graph to an existing project or starterProjectId

`POST /api/scenes`

## Request

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

## Request body

- SaveSceneRequest
  - `id` string: Existing project id. For agent registration, use starterProjectId.
  - `projectId` string, nullable
  - `name` string, required
  - `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

## Response `201`

Scene saved

- 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

- `400`: Invalid request
- `401`: Missing or invalid API key/session
- `404`: Scene or project not found

---

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