Skip to content
GET/workspaces/{workspace}/teams

A team is a group of the workspace’s members, given roles on repositories together, mentioned as @workspace/team and asked to review together. A secret team is seen only by its own people and the workspace’s owners. Each team has its slug, name, description, visibility (visible or secret), parent, whether its people are notified when it is mentioned (notify), its review_assignment, how many people, repositories and child teams it has (members_count, repos_count, child_teams_count), your own viewer_role in it, and whether you may change it (can_manage). query narrows them by name or slug. Members of the workspace only.

Teams you are in come first, then the rest by name. A secret team is listed only for its own people and the workspace’s owners. review_assignment is what happens when the team is asked to review: see set_team_review_assignment. 403 for anyone who is not a member of the workspace. See Teams.

  • Authentication: Required. Send an access token as Authorization: Bearer.
  • MCP tool: team with action list, and the same inputs
  • Scope: An access token needs workspace:read.
Name Type Required Description
workspace string Yes The workspace’s slug, e.g. “flagon-io”.
Name Type Required Description
q string No Only teams whose name or slug has these letters.
curl "https://api.g1t.sh/workspaces/flagon-io/teams?q=back" \
-H "Authorization: Bearer $G1T_TOKEN"

A successful request answers 200 with:

[
{
"id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
"workspace": "flagon-io",
"slug": "backend",
"name": "Backend",
"description": "The API and the services behind it.",
"visibility": "visible",
"parent": {
"slug": "engineering",
"name": "Engineering"
},
"notify": true,
"review_assignment": {
"enabled": false,
"algorithm": "round_robin",
"count": 1,
"skip_busy": false,
"busy_at": 5,
"include_child_teams": false,
"excluded": [],
"notify_team": false
},
"members_count": 4,
"repos_count": 2,
"child_teams_count": 1,
"viewer_role": "maintainer",
"can_manage": true,
"created_at": "2026-10-06T15:02:11.480Z",
"updated_at": "2026-10-06T15:02:11.480Z"
}
]

A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.

Status Code When
401 unauthenticated A token is required, or the one sent is not valid.
403 forbidden The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository.
404 not_found It does not exist, or you cannot see it.
422 invalid The input is not valid. message says which field and why.