Skip to content
中文

Update canvas

PATCH /canvas/v1/canvases/{canvas_id}

Rename a canvas or move it to a collection without editing its design content. Use a canvas id from canvases.list and a collection id from collections.list. Send collection_id=null to make it uncategorized; omit either field to preserve its current value. A canvas belongs to at most one collection. The destination must belong to your organization. Renaming keeps the canvas version unchanged.

Support: supported

Parameters

NameLocationTypeRequiredDescription
canvas_idpathstringtrueCanvas id returned by create or list, in the form cvs_ followed by 16 lowercase letters or digits; a display name is not accepted.

Request body (application/json)

Required: true

NameTypeDescription
namestringNew canvas display name; surrounding whitespace is trimmed, blank names use Untitled, and omission preserves the current name.
collection_idstring | nullMove to this collection id from collections.list; null removes the canvas from its collection. Omission preserves the current assignment.
{
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"description": "New canvas display name; surrounding whitespace is trimmed, blank names use Untitled, and omission preserves the current name."
},
"collection_id": {
"type": [
"string",
"null"
],
"description": "Move to this collection id from collections.list; null removes the canvas from its collection. Omission preserves the current assignment."
}
}
}

Response

HTTP 200

Updated canvas metadata with the resulting name and collection assignment.

application/json

Name Type Description
id string Assigned canvas identifier, cvs_ followed by 16 lowercase letters or digits; reuse it as canvas_id in subsequent requests.
object string Resource discriminator; canvas identifies a design canvas.
name string Display name supplied at creation; defaults to Untitled if omitted and is not an API identifier.
version string Current revision as a decimal string, incremented by one after each successful write; pass it as expected_version to guard a subsequent execute call.
page_count integer Number of visible top-level frames in this canvas; hidden frames do not contribute.
node_count integer Total number of design nodes currently in the canvas.
created_at string ISO 8601 timestamp recording when this canvas was created.
updated_at string ISO 8601 timestamp of the latest canvas update; list orders canvases newest first by this value.
viewer_url string Console URL where a person can watch this canvas update live; open it to review drawing results.
collection_id string | null Collection id from collections.list, or null for an uncategorized canvas; a canvas belongs to at most one collection.
library null | object The canvas's latest published library version, or null when it has never been published as a library.
library.version string Latest published library version, counting from 1.
library.published_at string ISO 8601 time at which that version was published.
imports array<object> Libraries this canvas imports, by alias; present on retrieve and list, absent where only the canvas is named (create, update).
imports[].alias string The alias this library is imported under; components are referenced as alias:component_id and variables as $alias:name.
imports[].library string The library's canvas id.
imports[].name string The library's current name, or the name it had when imported if the library canvas was deleted.
imports[].version string The library version this canvas uses.
imports[].latest_version string | null The library's newest published version, or null when the library canvas was deleted.
imports[].status string current means this canvas uses the newest version; outdated means a newer one exists (move the alias with imports.create); deleted means the library canvas is gone, and the imported version keeps rendering.
imports[].instances object Present on retrieve only. How many nodes of this canvas instantiate each component, keyed by component id without the alias, including instances inside replaced subtrees; a component with no instance is absent.