# Create a teamspace

`POST /v1/workspaces/{workspaceId}/teamspaces`

You become its owner. Guests cannot create teamspaces.

Scope: `docs:write`.

## Request

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

## Path parameters

- `workspaceId` (string, required): (1–64 chars)

## Body

- `id` (string, optional): Client-minted id. Generated when omitted. (1–64 chars)
- `name` (string, required): (1–100 chars)
- `description` (string, optional): Default: `""`. (≤ 2000 chars)
- `icon` (string, optional, nullable): Default: `null`. (≤ 100 chars)
- `visibility` (string, optional): One of: `open`, `closed`, `private`. Default: `"open"`.
- `isDefault` (boolean, optional): Default: `false`.

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