Update scene content
Update the complete content of a scene with new elements, files, and settings.
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
- Increment scene version (automatic if not provided)
If you don't provide a sceneVersion, it will be incremented from the current version. Providing an explicit version can help with conflict resolution.
This is a complete replacement operation. Any existing elements not included in the request will be removed from the scene.
Use cases:
- Saving scene changes after editing
- Implementing collaborative editing
- Restoring scene from backup
- Programmatic scene generation
Authorization
apiKey AuthorizationBearer <token>
The API will use the Authorization: Bearer <your-key> header for requests.
In: header
Path Parameters
sceneId*string
Request Body
application/json
type*string
Value in
"excalidraw"version*number
source*string
sceneVersion?string
files*
[key: string]?never
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://api.excalidraw.com/api/v1/scenes/string/content" \ -H "Content-Type: application/json" \ -d '{ "type": "excalidraw", "version": 0, "source": "string", "files": { "property1": { "mimeType": "string", "id": "string", "created": 9007199254740991, "dataURL": "string" }, "property2": { "mimeType": "string", "id": "string", "created": 9007199254740991, "dataURL": "string" } } }'{
"type": "excalidraw",
"version": 0,
"source": "string",
"appState": {
"viewBackgroundColor": "string",
"lockedMultiSelections": {
"property1": true,
"property2": true
}
},
"elements": [
null
],
"sceneVersion": "string",
"files": {
"property1": {
"mimeType": "string",
"id": "string",
"created": 9007199254740991,
"lastRetrieved": 9007199254740991,
"version": 9007199254740991,
"dataURL": "string"
},
"property2": {
"mimeType": "string",
"id": "string",
"created": 9007199254740991,
"lastRetrieved": 9007199254740991,
"version": 9007199254740991,
"dataURL": "string"
}
}
}{
"statusCode": 400,
"error": "Bad Request",
"message": "string"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "string"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "string"
}{
"statusCode": 404,
"error": "Not Found",
"message": "string"
}