Skip to content

Teams

Every endpoint on this page requires teams:read.

Returns a paged team directory.

ParameterTypeNotes
statestring, repeatableactive, inactive, archived
lead_user_account_idstring, repeatableFilter by lead
deliveries_enabledbooleanFilter by delivery support
querystringOptional free-text filter
cursorstringOptional cursor
page_sizeintegerOptional page size
sortstringname, code, member_count, active_project_count, or state
directionstringasc, ascending, desc, or descending
Terminal window
curl "$API_BASE_URL/v1/teams?state=active&deliveries_enabled=true&sort=name&direction=asc" \
-H "Authorization: Bearer $ACCESS_TOKEN"

Response 200 OK:

{
"results": [
{
"id": "team_platform",
"workspaceId": "ws_01EXAMPLE",
"name": "Platform",
"code": "PLAT",
"slug": "platform",
"description": "Owns shared platform capabilities.",
"iconCss": "fa-solid fa-layer-group",
"color": "#2563eb",
"state": "active",
"leadUserAccountId": "usr_01EXAMPLE",
"leadDisplayName": "Alex Morgan",
"leadAvatarUrl": "https://cdn.example.com/avatars/alex.png",
"memberCount": 12,
"activeProjectCount": 4,
"deliveriesEnabled": true
}
],
"pagination": {
"pageSize": 100,
"cursor": "",
"nextCursor": "",
"hasMore": false,
"returnedCount": 1,
"totalCount": 1
}
}

Returns one team by team code.

Terminal window
curl "$API_BASE_URL/v1/teams/PLAT" \
-H "Authorization: Bearer $ACCESS_TOKEN"

Response 200 OK:

{
"id": "team_platform",
"workspaceId": "ws_01EXAMPLE",
"name": "Platform",
"code": "PLAT",
"slug": "platform",
"description": "Owns shared platform capabilities.",
"iconCss": "fa-solid fa-layer-group",
"color": "#2563eb",
"state": "active",
"leadUserAccountId": "usr_01EXAMPLE",
"leadDisplayName": "Alex Morgan",
"leadAvatarUrl": "https://cdn.example.com/avatars/alex.png",
"memberCount": 12,
"activeProjectCount": 4,
"deliveriesEnabled": true,
"nextIssueNumber": 184
}

Returns the team’s configured SCM repository context.

ParameterTypeNotes
providerstring, repeatablegithub, azuredevops, azure-devops, or azure_devops
is_defaultbooleanFilter by default-for-agents flag
querystringMatches repository or project names
cursorstringOptional cursor
page_sizeintegerOptional page size
sortstringrepository_name, provider, project_name, or default_branch
directionstringasc, ascending, desc, or descending
Terminal window
curl "$API_BASE_URL/v1/teams/PLAT/repositories?provider=github&is_default=true" \
-H "Authorization: Bearer $ACCESS_TOKEN"

Response 200 OK:

{
"results": [
{
"id": "repoctx_platform_main",
"teamId": "team_platform",
"workspaceScmConnectionId": "scmconn_github_main",
"provider": 1,
"externalProjectId": "github_org_quantify",
"externalProjectName": "moltenmouse",
"externalRepositoryId": "github_repo_quantify",
"externalRepositoryName": "quantify",
"externalRepositoryFullName": "moltenmouse/quantify",
"externalRepositoryUrl": "https://github.com/moltenmouse/quantify",
"defaultBranch": "main",
"isDefaultForAgents": true
}
],
"pagination": {
"pageSize": 100,
"cursor": "",
"nextCursor": "",
"hasMore": false,
"returnedCount": 1,
"totalCount": 1
}
}

GET /v1/teams/{teamCode}/repositories/default

Section titled “GET /v1/teams/{teamCode}/repositories/default”

Returns the team’s default repository for agent operations.

Terminal window
curl "$API_BASE_URL/v1/teams/PLAT/repositories/default" \
-H "Authorization: Bearer $ACCESS_TOKEN"

Response 200 OK:

{
"id": "repoctx_platform_main",
"teamId": "team_platform",
"workspaceScmConnectionId": "scmconn_github_main",
"provider": 1,
"externalProjectId": "github_org_quantify",
"externalProjectName": "moltenmouse",
"externalRepositoryId": "github_repo_quantify",
"externalRepositoryName": "quantify",
"externalRepositoryFullName": "moltenmouse/quantify",
"externalRepositoryUrl": "https://github.com/moltenmouse/quantify",
"defaultBranch": "main",
"isDefaultForAgents": true
}
  • Invalid team-state or provider filters return 400 invalid_request
  • Unknown team codes return 404 not_found
  • Missing default repository returns 404 not_found