> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://smartx.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://smartx.ferndocs.com/_mcp/server.

# Introduction

The SmartX Books API lets you create, read, update, and delete books in a library.
It's a standard CRUD API with no authentication required — great for exploring
how Fern generates documentation from an OpenAPI spec.

## Base URL

```
http://localhost:3000
```

## Resources

The API exposes one resource:

| Resource | Path prefix     | Description                    |
| -------- | --------------- | ------------------------------ |
| Books    | `/api/v1/books` | Manage individual book records |

## Operations

| Method   | Path                 | What it does         |
| -------- | -------------------- | -------------------- |
| `GET`    | `/api/v1/books`      | List all books       |
| `POST`   | `/api/v1/books`      | Create a new book    |
| `GET`    | `/api/v1/books/{id}` | Fetch a book by ID   |
| `PUT`    | `/api/v1/books/{id}` | Update a book        |
| `DELETE` | `/api/v1/books/{id}` | Delete a book        |
| `GET`    | `/health`            | Service health check |

## Authentication

This API requires no authentication. All endpoints are publicly accessible.

## Request & response format

All request and response bodies use `application/json`.

A `Book` object looks like this:

```json
{
  "id": "1",
  "title": "The Great Gatsby",
  "author": "F. Scott Fitzgerald",
  "year": 1925
}
```

## Error responses

Errors follow a consistent shape across all endpoints:

```json
{
  "error": {
    "name": "NotFound",
    "message": "Book with id '99' was not found."
  }
}
```

## Next steps

Browse the full endpoint reference in the **API Reference** tab.