# Create a workspace

`POST /v1/workspaces`

Creates a workspace with you as its owner and an open, default teamspace called General.

Needs a signed-in session; API and OAuth tokens get 403.

## Request

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

## Body

- `id` (string, optional): Client-minted id. Generated when omitted. (1–64 chars)
- `name` (string, required): (1–200 chars)
- `defaultTeamspaceId` (string, optional): (1–64 chars)

## Response

- `id` (string, required): (1–64 chars)
- `name` (string, required)
- `role` (string, required): One of: `owner`, `admin`, `member`, `guest`.
- `createdAt` (timestamp, required)
- `updatedAt` (timestamp, required)

```json
{
  "id": "01JCQ3TZ0WJ8K4M2X7T9R6N1PA",
  "name": "Notes",
  "role": "owner",
  "createdAt": "2026-11-12T09:30:00.000Z",
  "updatedAt": "2026-11-12T09:30:00.000Z"
}
```

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