Teams
Every endpoint on this page requires teams:read.
GET /v1/teams
Section titled “GET /v1/teams”Returns a paged team directory.
Query parameters
Section titled “Query parameters”| Parameter | Type | Notes |
|---|---|---|
state | string, repeatable | active, inactive, archived |
lead_user_account_id | string, repeatable | Filter by lead |
deliveries_enabled | boolean | Filter by delivery support |
query | string | Optional free-text filter |
cursor | string | Optional cursor |
page_size | integer | Optional page size |
sort | string | name, code, member_count, active_project_count, or state |
direction | string | asc, ascending, desc, or descending |
Example
Section titled “Example”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 }}GET /v1/teams/{teamCode}
Section titled “GET /v1/teams/{teamCode}”Returns one team by team code.
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}GET /v1/teams/{teamCode}/repositories
Section titled “GET /v1/teams/{teamCode}/repositories”Returns the team’s configured SCM repository context.
Query parameters
Section titled “Query parameters”| Parameter | Type | Notes |
|---|---|---|
provider | string, repeatable | github, azuredevops, azure-devops, or azure_devops |
is_default | boolean | Filter by default-for-agents flag |
query | string | Matches repository or project names |
cursor | string | Optional cursor |
page_size | integer | Optional page size |
sort | string | repository_name, provider, project_name, or default_branch |
direction | string | asc, ascending, desc, or descending |
Example
Section titled “Example”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.
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}Error notes
Section titled “Error notes”- Invalid team-state or provider filters return
400 invalid_request - Unknown team codes return
404 not_found - Missing default repository returns
404 not_found