# Restore a deleted teamspace

`POST /v1/teamspaces/{teamspaceId}/restore`

Brings back a deleted teamspace and the pages that were moved to the trash with it. Pages trashed before the teamspace was deleted stay in the trash. Workspace owners and admins, and the teamspace's owners.

Scope: `docs:write`.

## Request

```bash
curl -X POST "https://api.lydie.co/v1/teamspaces/01JCQ3V5MZ8G4ZK2X7T9R6N1PB/restore" \
  -H "Authorization: Bearer $LYDIE_TOKEN"
```

## Path parameters

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

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