Skip to main content

Canvas API

Canvas API

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

Quick Reference

MethodDescription
createCreates a new canvas document.
getRetrieves a canvas document.
updateUpdates an existing canvas document.

Methods


create

client.canvas.create(data: CreateCanvasRequest): Promise<Canvas>

Creates a new canvas document.

Provisions a blank or pre-populated canvas that can be used for visual planning, diagramming, or structured content creation.

ParameterTypeRequiredDescription
dataCreateCanvasRequestYesThe canvas creation payload including title and content

Returns: Promise<Canvas> — A promise that resolves to the newly created

Full reference →


get

client.canvas.get(params?: GetCanvasParams): Promise<Canvas>

Retrieves a canvas document.

Returns the full canvas including its content, metadata, and current state.

ParameterTypeRequiredDescription
paramsGetCanvasParamsNoOptional query parameters to identify the canvas

Returns: Promise<Canvas> — A promise that resolves to the

Full reference →


update

client.canvas.update(data: UpdateCanvasRequest): Promise<Canvas>

Updates an existing canvas document.

Modifies the content, title, or other properties of a canvas.

ParameterTypeRequiredDescription
dataUpdateCanvasRequestYesThe fields to update on the canvas

Returns: Promise<Canvas> — A promise that resolves to the updated

Full reference →