latestOpenAPI 3.0.02026-08-08270135.7 KB

c1404d1545ba

scenes
scene-content

Replace scene content

Replace the complete content of a scene with the supplied elements, files, and app state.

This endpoint allows you to:
- Replace all scene elements with new ones
- Update or add files to the scene
- Modify scene settings and app state
- Force connected editors to reload the scene after an authoritative full replacement

<Callout type="warn">
This is an authoritative full replacement. Any existing elements not included in the request will be removed from the scene, connected editors will be forced to reload instead of reconciling the change incrementally, and any `sceneVersion` value in the request body will be ignored because the server always recomputes it from the submitted content. If you only want to add or update specific elements, files, or app-state fields without replacing the whole scene, use `PATCH /scenes/:sceneId/content` instead.
</Callout>

**Use cases:**
- Restoring scene from backup
- Replacing a scene from an external system of record
- Correcting a scene even while editors are currently open
- Programmatic scene generation
put/api/v1/scenes/{sceneId}/content

Path parameters

sceneIdstring required

Request body

type'excalidraw' required
versionnumber required
sourcestring required
{"stackTrail":"paths:/api/v1/scenes/{sceneId}/content:put:requestBody:content:application/json:schema:properties:appState","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/api/v1/scenes/{sceneId}/content:put:requestBody:content:application/json:schema:properties:elements","oasType":"schema","type":"unknown"}
sceneVersionstring
filesobject required
filesFailedToEmbedstring[]

Ignored on write requests. Present so GET responses can be reused as PUT/PATCH inputs.

Response

This response returns the replaced content for the scene.

type'excalidraw' required
versionnumber required
sourcestring required
sceneVersionstring required
filesobject required