Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Canvas

Read a photo of a board into notes

Takes a photo of a cork board or a whiteboard with sticky notes on it. The photo goes on the canvas. The Chief of Staff reads it on the workspace's AI plan, and each note that it can read becomes a sticky note in its colour, laid out as on the board, in a frame beside the photo. Words written on the board itself become text. Send a PNG, JPEG or WebP image of at most 3.5 MB and 8,000 pixels a side, base64-encoded. The answer comes at once: poll statusUrl until status is done. A workspace reads 20 photos a day, 2 at a time. From the CLI, pass --content @./board.jpg to read a file.

post/api/v1/canvases/{id}/photos

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 read-photo
MCP toolNone. Call it over REST or with the CLI.
Rate limit10 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
content*string

The photo, base64-encoded

At most 4700000 characters · base64

Response

202 · application/json
data*object
8 properties
id*string

The read: GET /canvases/{id}/photos/{read} says where it is

status*enum<string>

reading: the Chief of Staff reads the photo; poll statusUrl every few seconds

readingdonefailed

photo*string | null

The photo on the canvas, an image item

frame*string | null

The frame that holds the notes, once they are there

notes*integer

The notes and the words of the board that it added

error*string | null

Why it failed

createdAt*string

ISO 8601 date and time

statusUrl*string

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.