CanvasesSave canvas state

Save canvas state

Persist the full working state of a canvas: viewport, the complete set of nodes, and the complete set of edges. Nodes and edges not present in the payload are deleted. Increments the canvas version and writes a version snapshot. Requires an agency key (ak_).

curl -X POST "https://mythic-analytics.gulp.workers.dev/builder/canvases/123e4567-e89b-12d3-a456-426614174000/save?location_id=acme-retail" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "viewport": {
    "x": 0,
    "y": 0,
    "zoom": 1
  },
  "nodes": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "type": "page",
      "label": "example_string",
      "position_x": 3.14,
      "position_y": 3.14
    }
  ],
  "edges": [
    {
      "id": "example_string",
      "source_node_id": "123e4567-e89b-12d3-a456-426614174000",
      "target_node_id": "123e4567-e89b-12d3-a456-426614174000",
      "source_handle": "example_string",
      "target_handle": "example_string",
      "label": "example_string"
    }
  ]
}'
{
  "success": true,
  "version": 4
}
POST
/canvases/{id}/save
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Builder key as a bearer token. Use an agency key for full CRUD (Bearer ak_...) or a viewer key for read-only access (Bearer sk_...). Scoped keys (mcp_) are accepted too and need canvases:read or canvases:write. See Using an mcp_ key over HTTP.

Builder key as a bearer token. Use an agency key for full CRUD (Bearer ak_...) or a viewer key for read-only access (Bearer sk_...). Scoped keys (mcp_) are accepted too and need canvases:read or canvases:write. See Using an mcp_ key over HTTP.
path
idstring
Required

Canvas UUID.

Format: uuid
query
location_idstring

Client location to scope the request to. Required when authenticating with an agency key (ak_). Ignored for viewer keys (sk_).

Content-Typestring
Required

The media type of the request body

Options: application/json
nodesarray

Complete node set. Missing nodes are deleted.

edgesarray

Complete edge set. Missing edges are deleted.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Builder key as a bearer token. Use an agency key for full CRUD (Bearer ak_...) or a viewer key for read-only access (Bearer sk_...). Scoped keys (mcp_) are accepted too and need canvases:read or canvases:write. See Using an mcp_ key over HTTP.

Path Parameters

idstring
Required

Canvas UUID.

Query Parameters

location_idstring

Client location to scope the request to. Required when authenticating with an agency key (ak_). Ignored for viewer keys (sk_).

Example:
acme-retail

Body

application/json
viewportobject
Example:
{"x":0,"y":0,"zoom":1}
nodesarray

Complete node set. Missing nodes are deleted.

edgesarray

Complete edge set. Missing edges are deleted.

Responses

successboolean
versioninteger