# Update a teamspace

`PATCH /v1/teamspaces/{teamspaceId}`

Changes name, description, icon, visibility or default flag. Teamspace owners and workspace owners/admins only. Changing visibility changes who can read its pages.

Scope: `docs:write`.

## Request

```bash
curl -X PATCH "https://api.lydie.co/v1/teamspaces/01JCQ3V5MZ8G4ZK2X7T9R6N1PB" \
  -H "Authorization: Bearer $LYDIE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Path parameters

- `teamspaceId` (string, required): Teamspace id. (1–64 chars)

## Body

- `name` (string, optional): (1–100 chars)
- `description` (string, optional): (≤ 2000 chars)
- `icon` (string, optional, nullable): (≤ 100 chars)
- `visibility` (string, optional): One of: `open`, `closed`, `private`.
- `isDefault` (boolean, optional)

## Response

- `id` (string, required): (1–64 chars)
- `workspaceId` (string, required): (1–64 chars)
- `name` (string, required)
- `description` (string, required)
- `icon` (string, required, nullable)
- `visibility` (string, required): One of: `open`, `closed`, `private`.
- `isDefault` (boolean, required)
- `myRole` (string, required, nullable): One of: `owner`, `member`.
- `createdAt` (timestamp, required)
- `updatedAt` (timestamp, required)
- `deletedAt` (timestamp, optional, nullable)

```json
{
  "id": "string",
  "workspaceId": "01JCQ3TZ0WJ8K4M2X7T9R6N1PA",
  "name": "Notes",
  "description": "string",
  "icon": null,
  "visibility": "open",
  "isDefault": false,
  "myRole": null,
  "createdAt": "2026-11-12T09:30:00.000Z",
  "updatedAt": "2026-11-12T09:30:00.000Z",
  "deletedAt": null
}
```

Errors use the envelope described at https://developers.lydie.co/errors.md.
