---
title: "Save the draft as a version when it changed, publish the latest saved version, and bake its 3D file"
method: POST
path: "/api/scenes/{id}/publish"
---

# Save the draft as a version when it changed, publish the latest saved version, and bake its 3D file

`POST /api/scenes/{id}/publish`

## Request

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

The editor’s Save & publish. The project’s privacy is left as it is: a private project stays private. The 3D file bakes after the publish; read it from `GET /api/scenes/{id}/glb`.

## Path parameters

- `id` string, required

## Response `200`

Published

- object
  - `publishedVersion` integer, nullable, required
  - `didSaveVersion` boolean, required
  - `didPublishVersion` boolean, required: False when the latest saved version was already published.

## Other responses

- `401`: Missing or invalid API key/session
- `403`: Authenticated credential is not permitted to perform this operation
- `404`: Scene or project not found
- `409`: The project cannot be published as it is (`cannot_publish`): an empty scene, or nothing saved to publish.

---

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