Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Troop

Read a run

One run in full: every round with what it did, each tool call with its input, why the teammate made it, what it returned and whether it waits for approval, the call that runs now, and the answer.

get/api/v1/runs/{id}

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 runs get
MCP tooltroopy_get_run
Rate limit120 calls in 60 seconds, for each key

Path parameters

id*string

A 24-character id

Response

200 · application/json
data*object
21 properties
id*string

A 24-character id

agent*string
kind*enum<string>

compile_profile: the lead writing the short form of the long memory files; summarize: a teammate keeping the summary of a long conversation; translate: the Support agent translating the messages of a support chat, for Live translate; dream: the lead linking the notes of the brain, and inferring a few facts from them; learn_facts: the lead reading the facts of docs, web pages and files into Memories; watch_sessions: a teammate reads the sessions of visitors, and names the problems that they show; draft_brand: the lead drafting the empty lines of the brand from its website; classify_feedback: a teammate suggests the type and the themes of what customers said; fill_column: a batch of a list's AI column; triage: the lead's quick read of a troop chat message naming no teammate; distill: the lead reading what people said, for facts to keep: what they said to teammates, and their own talk with learnFromTalk; write_emails: a batch of a campaign's emails, written for each person; lessons: a teammate writing down what a finished task taught it (learnFromWork); write_rebuttal: a teammate writing the answer to a Stripe dispute, which Troopy checks against the records; read_photo: the lead reading the notes of a photo of a board onto a canvas

workdraft_roledraft_memorydraft_skilldraft_selffill_columntriagedistillwrite_emailslessonswrite_rebuttalclassify_feedbackdraft_brandread_photowatch_sessionslearn_factsand 4 more

trigger*object
5 properties
type*enum<string>

What started it: a message, a routine, a teammate handing work over, drafting a role, setting up memory after onboarding, a task, a message in the troop chat, a list's work column, the emails of a campaign, incidents to look at, a dispute to answer, what customers said to sort, a look at the sessions of visitors, documents whose facts wait for a read, a photo of a board to read onto a canvas, or a support chat with Live translate on

chatroutinescreenhandoffhiresetuptasktroopcolumncampaignincidentdisputecustomerssessionsbraincanvasand 1 more

threadId*string | null
routineId*string | null
fromRunId*string | null

The run that handed this work over

troopThreadId*string | null

A message in the troop chat: the thread it answers in, named by the thread's first message

taskId*string | null

The task it worked on

task*string
status*enum<string>

queued or running: poll statusUrl every few seconds

queuedrunningdonefailed

roleVersion*integer
summary*string

One line on what it did

error*string | null
doing*string | null

While it works: what it is doing, in its own few words, like "Checking Acme's payment terms"; null before its first step says

toolCalls*integer
skills*array<string>

The skills it used, by name: asked for with /name at the start of a message, then opened

requestedBy*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
createdAt*string

ISO 8601 date and time

finishedAt*string | null
statusUrl*string
reply*string | null

Its answer, in markdown

cites*array<object>

A teammate's answer: what in the brain it relied on, at most 5, each one it was shown, as it is now (what was deleted since is left out)

5 properties
type*enum<string>

docsource

id*string

A doc's slug, else the id

title*string
kind*string

A doc's or source's kind: a note, a web page, an interview, a research report...

wrong*object | null

A note someone said is wrong, and who: out of search until restored, or until they take it back

3 properties
by*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
at*string

ISO 8601 date and time

userId*string

A 24-character id

draft*object | null

For draft_role runs: the drafted role, to hire with POST /agents

rounds*array<object>
5 properties
startedAt*string

ISO 8601 date and time

endedAt*string | null
action*enum<string> | null

toolsfinish

doing*string | null

What the round did, in a few words of the teammate. Null for an older round

calls*array<object>
7 properties
tool*string
label*string
input*any
why*string | null

Why the teammate made the call, in its own words. Null when the run did not record it

status*enum<string>

waiting: stored for a person's approval. refused: not allowed, or invalid input. running: it runs now

donefailedwaitingrefusedrunning

result*string

What the teammate read back, cut to a size. Empty while the call runs

approvalId*string | null

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.
429 rate_limitedWait the number of seconds in Retry-After, then retry.