Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Canvas

Change items on a canvas

Changes items on a canvas: set sends only the fields to change, by key (an item deleted since is left alone); remove deletes items by key. Everyone with the canvas open sees it at once.

patch/api/v1/canvases/{id}/items

Authorization

HeaderAuthorization: Bearer <API key>
Or the headerX-API-Key: <API key>
API keyMake one in Troopy under Settings > API keys. It acts as you, in its workspace.

Other ways to call it

CLItroopy canvases edit
MCP tooltroopy_edit_canvas_items
Rate limit60 calls in 60 seconds, for each key
RetriesSend an Idempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.

Path parameters

id*string

A 24-character id

Body

application/json
setarray<object>

At most 500 items

2 properties
key*string

The item's key, unique on its canvas

fields*object
21 properties
xnumber

Left edge, in canvas units

At least -1000000 · At most 1000000

ynumber

Top edge, in canvas units

At least -1000000 · At most 1000000

wnumber

Width

At least 0 · At most 100000

hnumber

Height

At least 0 · At most 100000

znumber

Stacking order: higher sits on top

At least -1000000000000 · At most 1000000000000

colorenum<string>

sandpeachrosemintskycyanorangestoneink

textstring

What a note, text or shape says, or a frame's title

At most 5000 characters

shapeenum<string>

rectellipse

fromobject

Where an arrow starts: an item it follows, or a point

1 properties
key*string

The item's key, unique on its canvas

toobject

Where an arrow ends: an item it follows, or a point

1 properties
key*string

The item's key, unique on its canvas

pointsarray<number>

A pen stroke: x, y pairs, from the item's x and y

At most 4000 items

widthnumber

A pen stroke's or arrow's thickness

At least 1 · At most 64

filestring

An image's file, as uploading it named it

voterstring

A vote's voter: the person's user id. A vote's to is the note it is for

taskstring

The task a note became, by its key (like VIR-12)

authorobject

A comment's writer: only they change or delete it

2 properties
id*string

At most 64 characters

name*string

At least 1 characters · At most 80 characters

threadstring

A reply's comment: the first comment of its thread

resolvedboolean

A thread settled: its pin hides

atstring

When a comment was written (set by Troopy)

date-time

privateTostring

Hidden from everyone but this person while private mode is on (set by Troopy)

At most 64 characters

guestboolean

Added by a guest, through the canvas's link (set by Troopy)

removearray<string>

At most 500 items

Response

200 · application/json
data*object
1 properties
seq*integer

Errors

400 invalid_inputFix the field named in detail. Each operation's schema is in /api/v1/openapi.json.
401 unauthorizedSend an API key as `Authorization: Bearer tr_live_...`. Create one in Troopy under Settings.
403 forbiddenThe key lacks a scope this operation needs, or its owner lacks the role. detail says which; create a key with the scope, or ask an organization owner or admin.
404 not_foundCheck the path and any id in it. Every operation is listed in /api/v1/openapi.json.
409 conflictThis Idempotency-Key was used for a different request, or that request is still running. Use a new key for a new request.
429 rate_limitedWait the number of seconds in Retry-After, then retry.