Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Troop

Start a conversation

Sends a first message to a teammate, the troop's lead unless agent names another. It works on it in a run, with its role's tools and what the brain knows, on the organization's own AI plan and the workspace's computer, which must be connected. Answers 202 at once; poll statusUrl until status is no longer replying.

post/api/v1/threads

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 chat start
MCP tooltroopy_start_conversation
Rate limit20 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.

Body

application/json
agentstring

The teammate's handle, like chief

Default "chief" · At most 40 characters

message*string

What to say, at most 8,000 characters

At least 1 characters · At most 8000 characters

Response

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

A 24-character id

agent*string

The teammate's handle

title*string
status*enum<string>

replying: the teammate is working on an answer; poll statusUrl every few seconds

replyingfailedidle

error*string | null

Why the last answer failed, in words to show people

runId*string | null

The run working on the answer

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

telegram*boolean

Started from Telegram: its replies and approvals go to that chat too

call*boolean

Started on a voice call: its messages are what the person and the teammate said, and the answers to what the person asked for

continues*string | null

The full conversation that this one carries on

continuedBy*string | null

The conversation that carries this full one on. A message to a full conversation goes there, and the answer gives that conversation

createdAt*string

ISO 8601 date and time

updatedAt*string

ISO 8601 date and time

messages*array<object>

Oldest first

10 properties
from*enum<string>

personagent

text*string
by*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
at*string

ISO 8601 date and time

runId*string | null

The run that wrote a teammate's message; on a person's message sent while one worked, the run it was handed to (that run, or the follow-up it handed the message on to), whose reply answers it unless that run fails or is stopped; null on one that started a run (the run's reply carries its id), on one no run could take, and on a "stop" sent to end the run at work

approvalIds*array<string>

Approvals that run asked for

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

noteboolean

A teammate's words on the way, not its answer

choicesarray<string>

The answers that a person can tap under a note

reactionsarray<string>

What teammates reacted with, by name

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.
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.