Skip to content

Change a team's name, slug, description, visibility, parent (an empty string takes it out from under its parent), notify or review_assignment.

PATCH/workspaces/{workspace}/teams/{team}

Only the fields given change; give at least one. A new slug changes how it is mentioned, @workspace/slug. Owners of the workspace and the team’s maintainers. People only. Returns the team as it is now.

Only the fields given change. parent set to "" takes the team out from under its parent; a team cannot be nested under itself or one of its own child teams. A new slug changes how it is mentioned: @flagon-io/backend no longer reaches it. review_assignment takes the fields set_team_review_assignment does. Owners of the workspace and the team’s maintainers (403 otherwise).

  • Authentication: Required. Send an access token as Authorization: Bearer.
  • MCP tool: team with action update, and the same inputs
  • Scope: An access token needs workspace:admin.
Name Type Required Description
workspace string Yes The workspace’s slug, e.g. “flagon-io”.
team string Yes The team’s slug, as in its mention @workspace/slug, e.g. “backend”.

Send a JSON object. Names are snake_case, as in responses; the camelCase spelling is accepted too.

Name Type Required Description
name string No A new display name.
slug string No A new slug, which changes its mention.
description string No A new description; an empty string clears it.
visibility string No visible: every member of the workspace sees it. secret: only its own people and the workspace’s owners. One of visible, secret.
parent string No The slug of the team to nest it under; an empty string for none.
notify boolean No Whether its people are notified when it is mentioned.
review_assignment object No What happens when it is asked to review; fields left out keep their value. See set_team_review_assignment.
review_assignment.enabled boolean No On: g1t picks count people from the team to ask. Off: everyone in it is asked.
review_assignment.algorithm string No round_robin: whoever this team asked least recently. load_balance: whoever has the fewest pull requests waiting on their review. One of round_robin, load_balance.
review_assignment.count integer No How many people to pick, 1 to 10. People from the team already asked count towards it.
review_assignment.skip_busy boolean No Leave out anyone with busy_at or more pull requests waiting on their review.
review_assignment.busy_at integer No With skip_busy: how many waiting reviews make someone busy, 1 to 100.
review_assignment.include_child_teams boolean No Also the people of its child teams: listed with list_members, picked from with review assignment.
review_assignment.excluded array of strings No Usernames never picked. Replaces the whole list.
review_assignment.notify_team boolean No Also tell the rest of the team when people are picked.
curl -X PATCH https://api.g1t.sh/workspaces/flagon-io/teams/backend \
-H "Authorization: Bearer $G1T_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"description": "The API, the services behind it, and their on-call.",
"visibility": "secret",
"parent": ""
}'

A successful request answers 200 with:

{
"id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
"workspace": "flagon-io",
"slug": "backend",
"name": "Backend",
"description": "The API, the services behind it, and their on-call.",
"visibility": "secret",
"parent": null,
"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-07T09:41:52.006Z"
}

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.
409 conflict The request conflicts with the current state.
422 invalid The input is not valid. message says which field and why.