API reference / Canvas
Add to a canvas
Adds up to 100 items: sticky notes, text, shapes (rect or ellipse), frames, arrows between items (from and to: {key}) or points, and pen strokes. Leave out x and y and they go in free space beside what is there, in rows; size, colour and stacking have defaults. Everyone with the canvas open sees them at once. A canvas holds at most 5,000 items.
/api/v1/canvases/{id}/itemsOther ways to call it
troopy canvases addtroopy_add_canvas_itemsIdempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.Path parameters
id*stringA 24-character id
Body
application/jsonitems*array<object>At most 100 items
23 properties
xnumberLeft edge, in canvas units
At least -1000000 · At most 1000000
ynumberTop edge, in canvas units
At least -1000000 · At most 1000000
wnumberWidth
At least 0 · At most 100000
hnumberHeight
At least 0 · At most 100000
znumberStacking order: higher sits on top
At least -1000000000000 · At most 1000000000000
colorenum<string>sandpeachrosemintskycyanorangestoneink
textstringWhat a note, text or shape says, or a frame's title
At most 5000 characters
shapeenum<string>rectellipse
fromobjectWhere an arrow starts: an item it follows, or a point
1 properties
key*stringThe item's key, unique on its canvas
toobjectWhere an arrow ends: an item it follows, or a point
1 properties
key*stringThe 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
widthnumberA pen stroke's or arrow's thickness
At least 1 · At most 64
filestringAn image's file, as uploading it named it
voterstringA vote's voter: the person's user id. A vote's to is the note it is for
taskstringThe task a note became, by its key (like VIR-12)
authorobjectA comment's writer: only they change or delete it
2 properties
id*stringAt most 64 characters
name*stringAt least 1 characters · At most 80 characters
threadstringA reply's comment: the first comment of its thread
resolvedbooleanA thread settled: its pin hides
atstringWhen a comment was written (set by Troopy)
date-time
privateTostringHidden from everyone but this person while private mode is on (set by Troopy)
At most 64 characters
guestbooleanAdded by a guest, through the canvas's link (set by Troopy)
keystringLeave out for a new key; one already on the canvas is refused
type*enum<string>stickytextshapearrowpenframe
Response
201 · application/jsondata*object2 properties
seq*integeritems*array<object>What was added, keys and places filled in
23 properties
xnumberLeft edge, in canvas units
At least -1000000 · At most 1000000
ynumberTop edge, in canvas units
At least -1000000 · At most 1000000
wnumberWidth
At least 0 · At most 100000
hnumberHeight
At least 0 · At most 100000
znumberStacking order: higher sits on top
At least -1000000000000 · At most 1000000000000
colorenum<string>sandpeachrosemintskycyanorangestoneink
textstringWhat a note, text or shape says, or a frame's title
At most 5000 characters
shapeenum<string>rectellipse
fromobjectWhere an arrow starts: an item it follows, or a point
1 properties
key*stringThe item's key, unique on its canvas
toobjectWhere an arrow ends: an item it follows, or a point
1 properties
key*stringThe 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
widthnumberA pen stroke's or arrow's thickness
At least 1 · At most 64
filestringAn image's file, as uploading it named it
voterstringA vote's voter: the person's user id. A vote's to is the note it is for
taskstringThe task a note became, by its key (like VIR-12)
authorobjectA comment's writer: only they change or delete it
2 properties
id*stringAt most 64 characters
name*stringAt least 1 characters · At most 80 characters
threadstringA reply's comment: the first comment of its thread
resolvedbooleanA thread settled: its pin hides
atstringWhen a comment was written (set by Troopy)
date-time
privateTostringHidden from everyone but this person while private mode is on (set by Troopy)
At most 64 characters
guestbooleanAdded by a guest, through the canvas's link (set by Troopy)
key*stringThe item's key, unique on its canvas
type*enum<string>stickytextshapearrowpenframeimagevotecomment