# Restore a note folder from the trash

Source: https://workroad.app/docs/api/restore-note-folder

`POST https://workroad.app/api/v1/note-folders/{folderId}/restore`

Brings a trashed folder back with the notes that went to the trash with it, and returns the folder. Needs `notes:delete`, the scope that trashed it. If a live folder took its name meanwhile, the restored folder is renamed `name (2)`, `name (3)` and so on. Notes trashed on their own before the folder stay in the trash.

- MCP tool: `restoreNoteFolder` on `https://workroad.app/api/mcp`
- Required scopes: notes:delete
- Test mode: `POST https://workroad.app/api/test/v1/note-folders/{folderId}/restore` checks the request and returns the example response without changing anything.

## Path parameters

- `folderId`: string (uuid), required. Note folder id, scoped to the key's user.

## Headers

- `Idempotency-Key`: string, optional, 1-255 visible ASCII characters. Makes the POST safe to retry: a retry with the same key and body replays the first response, and the same key with a different body returns 409 `idempotency_conflict`. Kept for 24 hours. Over MCP it is the `idempotencyKey` argument.

## Response

`200` OK

- `data`: object, required
  - `id`: string (uuid), required
  - `name`: string, required
  - `subjectId`: string or null, required. Subject id, when set.
  - `icon`: one of `"Folder"`, `"File"`, `"Book"`, `"Bookmark"`, `"Star"`, `"Heart"`, `"Flag"`, `"Tag"`, `"Inbox"`, `"Archive"`, `"GraduationCap"`, `"School"`, `"Backpack"`, `"Notebook"`, `"Pencil"`, `"Ruler"`, `"Calculator"`, `"Globe"`, `"Microscope"`, `"TestTube"`, `"Dna"`, `"Atom"`, `"Rocket"`, `"Telescope"`, `"Code"`, `"Terminal"`, `"Database"`, `"Server"`, `"Cpu"`, `"Wifi"`, `"Cloud"`, `"Bug"`, `"QrCode"`, `"PlusSquare"`, `"MinusSquare"`, `"DivideSquare"`, `"Percent"`, `"Sigma"`, `"Pi"`, `"Infinity"`, `"BarChart"`, `"LineChart"`, `"Magnet"`, `"Thermometer"`, `"Leaf"`, `"Droplet"`, `"Flame"`, `"Zap"`, `"Wind"`, `"Palette"`, `"Music"`, `"Camera"`, `"Video"`, `"Brush"`, `"Pen"`, `"Scissors"`, `"Shapes"`, `"Briefcase"`, `"TrendingUp"`, `"PieChart"`, `"DollarSign"`, `"CreditCard"`, `"ShoppingCart"`, `"Activity"`, `"Stethoscope"`, `"Apple"`, `"Dumbbell"`, `"Calendar"`, `"Clock"`, `"Timer"`, `"Hourglass"`, `"AlarmClock"`, `"MessageSquare"`, `"Mail"`, `"Phone"`, `"Share"`, `"Link"`, `"Coffee"`, `"Lightbulb"`, `"Map"`, `"Compass"`, `"Target"`, `"Trophy"`, `"Puzzle"`, `"Gift"`, `"Smile"`, required. Icon name shown in the UI.

### Example

```json
{
  "data": {
    "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
    "name": "Biology",
    "subjectId": null,
    "icon": "Folder"
  }
}
```

## Errors

Every error has the body `{ "error": { "code", "message", "details" } }`.

- `400`: Invalid request body or query
- `401`: Missing, invalid, disabled or expired API key
- `402`: `api_allowance_reached`: this month's API and AI app requests on the free plan are used up. `details` has `limit`, `used`, `resetsAt` and `upgradeUrl`. Nothing ran; WorkRoad Plus has no monthly limit.
- `403`: The API key lacks the required scope
- `404`: No note folder with that id is in the trash for this key's user.
- `405`: Method not allowed. Use a method from the Allow header.
- `409`: The Idempotency-Key was reused with a different request body, or a request with the same key is still in progress.
- `429`: Rate limit exceeded. Wait for Retry-After before retrying. The rate-limit headers are absent when the key's own limiter rejected the request before the per-endpoint bucket check ran.
- `500`: Internal server error
