Update a workspace
Change a workspace's display name and description, and what every member gets on each of its repositories (base_permission: none, read, write or admin).
/workspaces/{workspace}Only the fields given are changed; give at least one. An empty name falls back to the slug, which this never changes (that is a rename, on Settings); an empty description clears it. Owners only, signed in as a person. Returns the workspace as it is now.
Only the fields given change. name is the display name; the slug, the first part of the workspace’s addresses, stays as it is. base_permission needs the access:admin scope as well as workspace:admin; set_base_permission sets it alone. Refused with 403 for anyone but an owner signed in as a person. Recorded in the audit log. See Workspaces.
- Authentication: Required. Send an access token as
Authorization: Bearer. - MCP tool:
workspacewithactionupdate, and the same inputs - Scope: An access token needs
workspace:admin.
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
workspace |
string | Yes | The workspace’s slug, e.g. “flagon-io”. |
Body parameters
Section titled “Body parameters”Send a JSON object. Names are snake_case, as in responses; the camelCase spelling is accepted too.
| Name | Type | Required | Description |
|---|---|---|---|
name |
string | No | Its display name, at most 80 characters; longer is cut. Empty: its slug. |
description |
string | No | One line saying what it is for, at most 160 characters; longer is cut. Empty clears it. |
base_permission |
string | No | What every member gets on each repository: none, read, write or admin. Needs the access:admin scope as well. One of none, read, write, admin. |
Example request
Section titled “Example request”curl -X PATCH https://api.g1t.sh/workspaces/acme-labs \ -H "Authorization: Bearer $G1T_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme Labs", "description": "Rockets, and the software that flies them." }'Example response
Section titled “Example response”A successful request answers 200 with:
{ "id": "wsp_01m43teqa9em6bje0bhvdj4jkb", "slug": "acme-labs", "name": "Acme Labs", "description": "Rockets, and the software that flies them.", "created_at": "2026-10-04T16:02:51.337Z", "member_count": 3, "base_permission": "write"}Errors
Section titled “Errors”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. |