# 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).

<div class="g1t-endpoint"><span class="g1t-method" data-method="patch">PATCH</span><code>/workspaces/{workspace}</code></div>

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`](/reference/api/access/set-base-permission/) sets it alone. Refused with `403` for anyone but an owner signed in as a person. Recorded in the [audit log](/guides/audit-log/). See [Workspaces](/guides/workspaces/).

- **Authentication:** Required. Send an [access token](/reference/api/#authentication) as `Authorization: Bearer`.
- **MCP tool:** [`workspace`](/reference/mcp/#workspace) with `action` `update`, and the same inputs
- **Scope:** An access token needs [`workspace:admin`](/guides/authentication/#scopes).

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace` | string | Yes | The workspace's slug, e.g. "flagon-io". |

## 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

```sh
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

A successful request answers `200` with:

```json
{
  "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

A failed request answers with one of these statuses and a body like `{"error": {"code": "not_found", "message": "Repository not found."}}`. See [errors](/reference/api/#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. |
