Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Troop

Reply in a troop chat thread

Replies in a thread in the troop chat. The teammates it @mentions answer in the thread (@all: every one); naming no one, it goes to whoever the thread's latest message from a person went to (see with in GET /troop/messages/{id}), unless, as in the room, a quick read applies: with nobody answering in the thread and a person's word last (not the sender's own to a teammate), a person's reply is read first. A teammate already answering in the thread takes it in, and answers it right after if it finished without seeing it. A reply that only says stop (stop, cancel, never mind; naming no one, or @all) stops every answer in the thread its sender may stop: the asker's own, or any for an owner or admin; with none to stop it is a reply like any other, and @all means the lead. Answers 202 at once; read the thread until answering is empty.

post/api/v1/troop/messages/{id}/replies

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 troop reply
MCP tooltroopy_reply_in_troop_thread
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.

Path parameters

id*string

A 24-character id

Body

application/json
message*string

What to say, at most 8,000 characters

At least 1 characters · At most 8000 characters

Response

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

A 24-character id

threadId*string | null

The thread it replies in, named by the thread's first message; null for a message in the room

from*enum<string>

personagent

by*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
agent*string | null

A teammate's message: its handle while it is in the troop; null once it was let go

avatar*object | null

A teammate's message: its face when it wrote it

6 properties
shape*enum<string>

cloverflowertrianglesquareblobghostcircledropstardroidmechalienhexagoncatcloudpilland 2 more

color*string
face*enum<string>

eyesmouth

shadingenum<string>

How its body is lit; fabric when unset

fabricplasticcrispsmoothflat

robotobject

A TV-headed robot (robot-heads) in place of the bot. shape, color, face and shading stay for the bot

5 properties
shape*enum<string>

rectanglesquarecirclehexagon

shell*string

The colour of its shell

trim*string

The colour of its ears and of the collar of its antenna

screen*string

The colour of the lights on its screen

antenna*boolean
objectobject

An object with two eyes in place of the bot. shape, color, face and shading stay for the bot

2 properties
shape*enum<string>

circlesquaretrianglepilldrophexagonpentagoncloudbeancloverflowersparkleburstapplechatbulband 13 more

color*string

The colour of the object

text*string

Markdown when a teammate wrote it

to*array<string>

A person's message: the handles of the teammates it called on, who each answer it in its thread

runId*string | null

A teammate's message: the run that wrote it

failed*boolean

A teammate's message: its run failed, and the text says why

task*object | null

An update: the task the teammate moved to in_review or done, as it was then

3 properties
key*string
title*string
status*enum<string>

backlogtodoin_progressneeds_youin_reviewdonecanceled

approvalIds*array<string>

A teammate's message: approvals its run asked for, waiting in GET /approvals

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

reactions*array<object>

Reactions to it, each with who added it, in the order they first came

2 properties
emoji*enum<string>

A reaction, by name

thumbs_upheartlaughpartyeyescheckprayfirethinking

by*array<object>
3 properties
type*enum<string>

personagentapi

id*string
name*string
at*string

ISO 8601 date and time

started*array<string>

Teammates now answering it in its thread

handed*array<string>

Teammates already answering in the thread, who take it in: they answer it too, right after if need be

stopped*array<string>

Teammates whose answer under way it stopped: a message that only says stop, from whoever may stop it

skipped*array<object>

Teammates it called on that can't answer now, and why

2 properties
agent*string
error*string
triaging*boolean

Naming no teammate, it is being read to decide whether a teammate answers, looks into it, reacts or stays out (the workspace's troopRoom)

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.