Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Tasks and projects

Get a task

One task in full: its description, sub-tasks, what its teammates asked people, and its activity (comments and changes).

get/api/v1/tasks/{key}

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

Path parameters

key*string

A task's key (VIR-12), its number (12) or its id

At least 1 characters · At most 40 characters

Response

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

A 24-character id

key*string

Its key, like VIR-12

number*integer
title*string
status*enum<string>

backlogtodoin_progressneeds_youin_reviewdonecanceled

priority*enum<string>

noneurgenthighmediumlow

assignee*object | null
3 properties
type*enum<string>

agentperson

id*string
name*string
project*object | null
2 properties
id*string

A 24-character id

name*string
milestone*object | null

The milestone of its project it counts toward

2 properties
id*string

A 24-character id

name*string
area*enum<string>

Engineering, marketing or operations. Every task is in one

engineeringmarketingoperations

parent*object | null

The task this is a sub-task of

3 properties
id*string

A 24-character id

key*string
title*string
labels*array<string>
dueAt*string | null
sortOrder*number

Its place in its board column, lowest first

subOrder*number

Its place among its parent's sub-tasks, lowest first (then by number)

waitsOn*array<object>

The tasks that block it: they must be done before it starts

4 properties
id*string

A 24-character id

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

backlogtodoin_progressneeds_youin_reviewdonecanceled

blocked*boolean

Something it waits on is still open, so no teammate starts it yet

progress*object

Its sub-tasks: how many are done, of those not canceled

2 properties
done*integer
total*integer
comments*integer
waiting*integer

Questions and approvals its teammates are waiting on a person for

working*object | null

A teammate is on it now, and what it says it is doing

2 properties
runId*string

A 24-character id

doing*string | null
error*string | null

Why its teammate couldn't start it; pickup tries again

pr*object | null

The pull request its code work opened on GitHub

3 properties
number*integer
url*string
state*enum<string>

openclosedmerged

flow*object | null

An engineering ticket: its step, its analysis and plan, its gates and its release. null for other tasks

22 properties
stage*enum<string>

Its step: analyze, plan, build, test or release. Its status says who has it now. A released ticket is done

analyzeplanbuildtestrelease

kind*enum<string> | null

bugfeaturechange

size*enum<string> | null

How big a change the Engineer thinks it is

smallmediumlarge

repo*string | null

owner/name: the repo it changes

engineer*string | null

The Engineer's handle: it builds the ticket, and gets it back after testing

qa*string | null

The QA tester's handle, while one tests it

enteredAt*string

When it came to its step

tries*object

How many times testing sent it back to Build, of the times the workspace allows

2 properties
used*integer
max*integer
stuck*string | null

Why it waits on a person with nothing to answer: read it, then move it on or back

retry*enum<string> | null

While it is stuck: the step to move it to, to try again

analyzeplanbuildtestrelease

approve*boolean

A plan waits for a person's approval

tested*object | null

The commit that passed every gate: the only one Release merges

3 properties
sha*string
at*string

ISO 8601 date and time

verified*boolean

Troopy's own run of the repo's tests passed on this commit

refused*string | null

Why GitHub refused the last Release of the tested commit

checks*enum<string>

GitHub's checks on its change

nonependingpassfailunknown

codeReview*enum<string>

Troopy's code review of its change: a second agent reads the change for problems

nonependingpassfailunknown

tests*enum<string>

The QA tester's report on its change

nonependingpassfailunknown

screens*enum<string>

The blind critic's look at the pictures of its test run

nonependingpassfailunknown

analysis*object | null
8 properties
kind*enum<string>

analysisplan

version*integer

Send it back with an edit, or with the approval of a plan

body*string

Markdown

criteria*array<string>

An analysis: its Done when checks, in order. The QA tester checks them one by one as c1, c2, ...

approved*object | null

A plan: the version a person approved

3 properties
version*integer
by*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
at*string

ISO 8601 date and time

locked*boolean

Approved plans and their analyses are locked; moving the ticket back to Plan unlocks them

updatedBy*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
updatedAt*string

ISO 8601 date and time

plan*object | null
8 properties
kind*enum<string>

analysisplan

version*integer

Send it back with an edit, or with the approval of a plan

body*string

Markdown

criteria*array<string>

An analysis: its Done when checks, in order. The QA tester checks them one by one as c1, c2, ...

approved*object | null

A plan: the version a person approved

3 properties
version*integer
by*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
at*string

ISO 8601 date and time

locked*boolean

Approved plans and their analyses are locked; moving the ticket back to Plan unlocks them

updatedBy*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
updatedAt*string

ISO 8601 date and time

gates*object | null
6 properties
sha*string | null

The commit the gates read

checkList*array<object>

GitHub's checks, one by one

3 properties
name*string
state*enum<string>

nonependingpassfailunknown

url*string | null
review*enum<string>

What people said in their reviews on GitHub

noneapprovedchanges

mergeable*enum<string>

cleanbehindconflictblockedunknown

previewUrl*string | null

Where its change runs, from GitHub's deployments

checkedAt*string | null
sentBack*object | null

Why it last went back to Build

3 properties
from*enum<string>

testchecksreviewcode_reviewscreensperson

text*string
at*string

ISO 8601 date and time

release*object | null

How it was released: by a merge on GitHub, by Release in Troopy, or closed by hand

6 properties
mode*enum<string>

githubbuttonautomanual

by*object | null
3 properties
type*enum<string>

personagentapi

id*string
name*string
sha*string | null
method*enum<string> | null

squashmergerebase

pr*integer | null
at*string | null
requestedBy*object

Who it is for

3 properties
type*enum<string>

personagentapi

id*string
name*string
createdBy*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
createdAt*string

ISO 8601 date and time

updatedAt*string

ISO 8601 date and time

closedAt*string | null
version*integer

Send it back with a change to refuse the change if someone edited the task since

description*string

Markdown: the goal, the steps, what done looks like

subtasks*array<object>
30 properties
id*string

A 24-character id

key*string

Its key, like VIR-12

number*integer
title*string
status*enum<string>

backlogtodoin_progressneeds_youin_reviewdonecanceled

priority*enum<string>

noneurgenthighmediumlow

assignee*object | null
3 properties
type*enum<string>

agentperson

id*string
name*string
project*object | null
2 properties
id*string

A 24-character id

name*string
milestone*object | null

The milestone of its project it counts toward

2 properties
id*string

A 24-character id

name*string
area*enum<string>

Engineering, marketing or operations. Every task is in one

engineeringmarketingoperations

parent*object | null

The task this is a sub-task of

3 properties
id*string

A 24-character id

key*string
title*string
labels*array<string>
dueAt*string | null
sortOrder*number

Its place in its board column, lowest first

subOrder*number

Its place among its parent's sub-tasks, lowest first (then by number)

waitsOn*array<object>

The tasks that block it: they must be done before it starts

4 properties
id*string

A 24-character id

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

backlogtodoin_progressneeds_youin_reviewdonecanceled

blocked*boolean

Something it waits on is still open, so no teammate starts it yet

progress*object

Its sub-tasks: how many are done, of those not canceled

2 properties
done*integer
total*integer
comments*integer
waiting*integer

Questions and approvals its teammates are waiting on a person for

working*object | null

A teammate is on it now, and what it says it is doing

2 properties
runId*string

A 24-character id

doing*string | null
error*string | null

Why its teammate couldn't start it; pickup tries again

pr*object | null

The pull request its code work opened on GitHub

3 properties
number*integer
url*string
state*enum<string>

openclosedmerged

flow*object | null

An engineering ticket: its step in Analyze, Plan, Build, Test and Release. null for other tasks

17 properties
stage*enum<string>

Its step: analyze, plan, build, test or release. Its status says who has it now. A released ticket is done

analyzeplanbuildtestrelease

kind*enum<string> | null

bugfeaturechange

size*enum<string> | null

How big a change the Engineer thinks it is

smallmediumlarge

repo*string | null

owner/name: the repo it changes

engineer*string | null

The Engineer's handle: it builds the ticket, and gets it back after testing

qa*string | null

The QA tester's handle, while one tests it

enteredAt*string

When it came to its step

tries*object

How many times testing sent it back to Build, of the times the workspace allows

2 properties
used*integer
max*integer
stuck*string | null

Why it waits on a person with nothing to answer: read it, then move it on or back

retry*enum<string> | null

While it is stuck: the step to move it to, to try again

analyzeplanbuildtestrelease

approve*boolean

A plan waits for a person's approval

tested*object | null

The commit that passed every gate: the only one Release merges

3 properties
sha*string
at*string

ISO 8601 date and time

verified*boolean

Troopy's own run of the repo's tests passed on this commit

refused*string | null

Why GitHub refused the last Release of the tested commit

checks*enum<string>

GitHub's checks on its change

nonependingpassfailunknown

codeReview*enum<string>

Troopy's code review of its change: a second agent reads the change for problems

nonependingpassfailunknown

tests*enum<string>

The QA tester's report on its change

nonependingpassfailunknown

screens*enum<string>

The blind critic's look at the pictures of its test run

nonependingpassfailunknown

requestedBy*object

Who it is for

3 properties
type*enum<string>

personagentapi

id*string
name*string
createdBy*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
createdAt*string

ISO 8601 date and time

updatedAt*string

ISO 8601 date and time

closedAt*string | null
version*integer

Send it back with a change to refuse the change if someone edited the task since

asks*array<object>
14 properties
id*string

A 24-character id

taskId*string

A 24-character id

agent*string

The teammate asking

kind*enum<string>

decisioninputapprovallogin

question*string
options*array<string>

For a decision: the choices, the teammate's pick first

draftId*string | null

For an approval: the draft to approve

docobject | null

For the approval of a plan: the plan and the version to approve

2 properties
kind*enum<string>

analysisplan

version*integer
sitestring | null

For a login request: the site the teammate needs a login to

status*enum<string>

openansweredwithdrawn

answer*object | null
2 properties
choice*string | null
text*string | null
answeredBy*object | null
3 properties
type*enum<string>

personagentapi

id*string
name*string
answeredAt*string | null
createdAt*string

ISO 8601 date and time

activity*array<object>

Comments and changes, oldest first: the latest 100

7 properties
id*string

A 24-character id

kind*enum<string>

commentevent

by*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
text*string
change*object | null

For an event: what changed

3 properties
field*string
from*string | null
to*string | null
runId*string | null

The run that wrote it

at*string

ISO 8601 date and time

watchers*array<object>

People who follow it: its updates reach them

2 properties
id*string

A 24-character id

name*string
watching*boolean

Whether you follow it

blocking*array<object>

The tasks that it blocks: they wait on it

4 properties
id*string

A 24-character id

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

backlogtodoin_progressneeds_youin_reviewdonecanceled

related*array<object>

The tasks about the same thing

4 properties
id*string

A 24-character id

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

backlogtodoin_progressneeds_youin_reviewdonecanceled

duplicateOf*object | null

The task that it repeats. A duplicate is canceled

4 properties
id*string

A 24-character id

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

backlogtodoin_progressneeds_youin_reviewdonecanceled

duplicates*array<object>

The tasks that repeat it

4 properties
id*string

A 24-character id

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

backlogtodoin_progressneeds_youin_reviewdonecanceled

favorite*boolean

Whether it is in your Favorites

remindAt*string | null

When your bell tells you of it again. null for no reminder

reactions*array<object>

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

2 properties
emoji*string

The emoji

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

personagentapi

id*string
name*string
attachments*array<object>

Files on it, oldest first

7 properties
id*string

A 24-character id

name*string
contentType*string

As Troopy serves it; a type a browser could run is served as plain bytes

size*integer

In bytes

by*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
createdAt*string

ISO 8601 date and time

url*string

Downloads it: send your API key, or be signed in

code*object | null

Its code work, when a teammate changed code for it

9 properties
repo*string

owner/name

branch*string

Its own branch, troopy/<key>-<title>

working*boolean

A code session is working on it now

checks*object | null

The repo's tests, as Troopy ran them after the last session

4 properties
command*string
exitCode*integer
passed*boolean
tail*string

The end of the tests' output

verified*boolean

The tests passed on the branch's last commit, so a pull request can open

pr*object | null
3 properties
number*integer
url*string
state*enum<string>

openclosedmerged

summary*string | null

What the last session said it did

diff*string

The last session's changed files: on each line, the lines it adds, the lines it removes and the path (git diff --numstat). The last line gives the totals

at*string | null

When the last session ended

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.