---
title: "Get Document Chunks"
method: GET
path: "/knowledge_bases/v2/{kb_id}/documents/{doc_id}/chunks"
tags: ["Knowledge Bases V2"]
---

# Get Document Chunks

`GET /knowledge_bases/v2/{kb_id}/documents/{doc_id}/chunks`

## Request

- Base URL: `https://api.myaltimate.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.myaltimate.com/knowledge_bases/v2/{kb_id}/documents/{doc_id}/chunks`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Get all chunks for a specific document.

Returns all chunks for the specified document ordered by chunk_order_index.
Each chunk includes:
- Chunk ID and order index
- Content text
- Token count
- File path (if available)

## Path parameters

- `kb_id` integer, required
- `doc_id` integer, required

## Response `200`

Successful Response

- DocumentChunksResponse: Response for document chunks
  - `document_id` integer, required
  - `document_public_id` string, required
  - `document_name` string, required
  - `version` integer, required
  - `total_chunks` integer, required
  - `chunks` ChunkModel[], required
    - `chunk_id` string, required
    - `chunk_order_index` integer, required
    - `content` string, required
    - `tokens` integer, required
    - `file_path` string, nullable
    - `title` string, nullable
    - `summary` string, nullable
    - `tags` string[], nullable
    - `knowledge_type` string, nullable
    - `code_snippets` object[], nullable
    - `retrieval_count` integer, nullable

## Other responses

- `403`: Access denied
- `404`: Document not found
- `422`: Validation Error

---

[API](https://skmtc.dev/myaltimate/apis/myaltimate-api.md) - [All operations](https://skmtc.dev/myaltimate/apis/myaltimate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/myaltimate/apis/myaltimate-api/revisions/727657ce54e9?raw)
