---
title: "Retrieve a knowledge book's chapters and pages"
method: GET
path: "/knowledge-books/{book}/table-of-contents"
tags: ["Knowledge base"]
---

# Retrieve a knowledge book's chapters and pages

`GET /knowledge-books/{book}/table-of-contents`

## Request

- Base URL: `https://helpspot.example.com/api/v2`
- URL: `https://helpspot.example.com/api/v2/knowledge-books/{book}/table-of-contents`
- Auth: one of:
  - HTTP bearer
  - HTTP basic

## Path parameters

- `book` integer, required

## Query parameters

- `include_page_html` boolean

## Response `200`

Knowledge-base resource. See the Knowledge base guide.

- object
  - `data` KnowledgeChapterResource[], required
    - `id` integer
    - `book_id` integer
    - `name` string, nullable
    - `position` integer
    - `appendix` boolean
    - `pages` KnowledgePageResource[]
      - `id` integer
      - `chapter_id` integer
      - `name` string, nullable
      - `body_html` string, nullable
      - `created_by_staff_id` integer, nullable
      - `updated_by_staff_id` integer, nullable
      - `created_at` string, date-time, nullable
      - `updated_at` string, date-time, nullable
      - `position` integer
      - `highlighted` boolean
      - `helpful_votes` integer
      - `unhelpful_votes` integer
      - `related_pages` object[]
        - `id` integer
        - `name` string, nullable
        - `chapter_name` string, nullable
        - `book_id` integer
        - `book_name` string, nullable
      - `tags` string[]
      - `attachment_urls` string[]

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not Allowed
- `406`: Not Acceptable
- `413`: Content Too Large
- `422`: Validation error
- `429`: Too Many Requests
- `500`: Internal Server Error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/helpspot/apis/helpspot-api-v2.md) · [All operations](https://skmtc.dev/helpspot/apis/helpspot-api-v2/llms.txt) · [OpenAPI document](https://skmtc.dev/helpspot/apis/helpspot-api-v2/revisions/794dac0002c0?raw)
