API reference / Apps
List the branches of a GitHub repo
The branches of a repo that Troopy's GitHub App reaches, 500 at most: the default branch first, then the others by name. Sessions takes one of them for its bug tickets.
get
/api/v1/apps/github/branchesOther ways to call it
CLI
troopy github branchesMCP tool
troopy_list_branchesRate limit30 calls in 60 seconds, for each key
Query parameters
repo*stringowner/name
Response
200 · application/jsondata*object3 properties
repo*stringowner/name
defaultBranch*stringbranches*array<string>The default branch first
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.
429 rate_limitedWait the number of seconds in Retry-After, then retry.