> ## Documentation Index
> Fetch the complete documentation index at: https://servitlive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Collections

> Create collections and manage their stories.

| Method | Path | Description |
| - | - | - |
| `GET` | `/collections` | List collections |
| `POST` | `/collections` | Create a collection |
| `DELETE` | `/collections/:id` | Delete a collection. `404` if missing |
| `GET` | `/collections/:id/stories` | Stories in a collection |
| `POST` | `/collections/:collectionId/stories/:storyId` | Add a story |
| `DELETE` | `/collections/:collectionId/stories/:storyId` | Remove a story |

## POST /collections

| Body field | Type | Required |
| - | - | - |
| `name` | string | yes, unique |
| `description` | string | no |
| `color` | string | no, hex color |

```bash theme={null}
curl -X POST http://localhost:3000/collections \
  -H "Content-Type: application/json" \
  -d '{"name": "Sci-Fi", "color": "#00aa66"}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.