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

# List Knowledge Base Item Chunks

> Returns the item's chunks in order, one page at a time, with the item's review state. Use it to review an item created with `autoIndex: false` (status `PENDING_REVIEW`) before you index it.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/voice-agents/knowledge-base/{id}/chunks
openapi: 3.0.1
info:
  title: Hamsa API
  description: >-
    The Hamsa API: voice agents and their calls, phone numbers, batch calls and
    knowledge bases; speech to text, text to speech, voices and AI content.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v1/voice-agents/knowledge-base/{id}/chunks:
    get:
      summary: List the chunks of a knowledge base item
      description: >-
        Returns the item's chunks in order, one page at a time, with the item's
        review state. Use it to review an item created with `autoIndex: false`
        (status `PENDING_REVIEW`) before you index it.
      parameters:
        - in: path
          name: id
          required: true
          description: ID of the knowledge base item.
          schema:
            type: string
            format: uuid
            example: d949f13f-40d2-4e48-ac86-b66633070603
        - in: query
          name: skip
          required: false
          description: Page number, starting at 1.
          schema:
            type: integer
            minimum: 1
            default: 1
            example: 1
        - in: query
          name: take
          required: false
          description: Chunks per page (1-100).
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
            example: 50
        - in: query
          name: search
          required: false
          description: Return only chunks whose text contains this.
          schema:
            type: string
            minLength: 1
            example: refund
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/KnowledgeBaseChunk'
                        description: The chunks on this page, ordered by `position`.
                      total:
                        type: integer
                        description: >-
                          Number of chunks that match (all of the item's chunks
                          when there is no `search`).
                        example: 120
                      filtered:
                        type: integer
                        description: Number of chunks on this page.
                        example: 50
                      status:
                        type: string
                        nullable: true
                        enum:
                          - PROCESSING
                          - PENDING_REVIEW
                          - PROCESSED
                          - PARTIAL_SUCCESS
                          - COMPLETED_WITH_ERRORS
                          - FAILED
                          - UPLOAD_FAILURE
                          - READING_FAILURE
                          - INGESTION_FAILURE
                          - CANCELLED
                        description: >-
                          Status of the item. `PROCESSING`: being chunked or
                          indexed. `PENDING_REVIEW`: chunked, waiting for you to
                          review the chunks and index them. `PROCESSED`: indexed
                          and searchable. `PARTIAL_SUCCESS` /
                          `COMPLETED_WITH_ERRORS`: indexed, but some chunks
                          failed. `FAILED`, `UPLOAD_FAILURE`, `READING_FAILURE`,
                          `INGESTION_FAILURE`: processing failed (see
                          `failureReason`). `CANCELLED`: processing was
                          cancelled. `null`: just created and not processed yet
                          (the `PROCESSING` filter includes these items).
                        example: PENDING_REVIEW
                      hasUnindexedChanges:
                        type: boolean
                        description: >-
                          `true` when chunks were edited, added or deleted since
                          the last index: index the item to apply them.
                        example: true
                      indexVersion:
                        type: integer
                        description: >-
                          Goes up by one every time the item is indexed. `0` if
                          never indexed.
                        example: 2
                      chunkingConfig:
                        type: object
                        nullable: true
                        additionalProperties: true
                        description: >-
                          The chunking settings the current chunks were made
                          with, plus what was applied: `strategyApplied`,
                          `contextApplied` (true when at least one chunk got a
                          generated context; always false in previews),
                          `overlapApplied` (chunks that got an overlap),
                          `pages`, `detectedLanguage` (`SEMANTIC` runs) and
                          `modelApplied` (`LLM_GUIDED` only). You can send this
                          object back as `chunkingConfig`: the applied fields
                          are ignored.
                        example:
                          strategy: SEMANTIC
                          targetTokens: 400
                          minTokens: 40
                          maxTokens: 1800
                          overlapTokens: 0
                          strategyApplied: SEMANTIC
                          contextApplied: false
                          overlapApplied: 0
                          pages: 1
        '400':
          description: Invalid query parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: 'Unauthorized: missing or invalid API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '403':
          description: >-
            Your API key or role does not have the `knowledge_base:read`
            permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '404':
          description: Knowledge base item not found in this project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Server Side Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    KnowledgeBaseChunk:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Chunk ID.
          example: 0f1a5c0e-2d9b-4f8a-9d3e-6b2c1a7e8f90
        knowledgeBaseItemId:
          type: string
          format: uuid
          description: The knowledge base item the chunk belongs to.
          example: d949f13f-40d2-4e48-ac86-b66633070603
        position:
          type: integer
          description: Order of the chunk in the item, starting at 1.
          example: 3
        text:
          type: string
          description: Chunk text (at most 6,000 characters).
          example: Enterprise plans include a dedicated support line, available 24/7.
        charCount:
          type: integer
          description: Number of characters in `text`.
          example: 66
        wordCount:
          type: integer
          description: Number of words in `text`.
          example: 10
        origin:
          type: string
          enum:
            - AUTO
            - USER
          description: '`AUTO`: made by the chunker. `USER`: added by you.'
          example: AUTO
        flagged:
          type: boolean
          description: >-
            `true` when the chunker flagged the chunk for review (see
            `metadata.flags`). Editing the text clears it.
          example: false
        metadata:
          $ref: '#/components/schemas/KnowledgeBaseChunkMetadata'
        isIndexed:
          type: boolean
          description: >-
            `true` when the indexed copy matches the current text. `false` for
            new or edited chunks until you index the item.
          example: true
        indexedAt:
          type: string
          format: date-time
          nullable: true
          description: When the chunk was last indexed. `null` if never.
          example: '2026-10-08T10:05:50.000Z'
        createdAt:
          type: string
          format: date-time
          example: '2026-10-08T10:05:50.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-10-08T10:05:50.000Z'
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
          description: >-
            Service error code: the HTTP status with a service prefix (for
            example `8404`). Missing when the service has no code for that
            status.
          example: 8404
        message:
          type: string
          description: >-
            What went wrong. Some services (calls and recordings) put the error
            key here, for example `CallNotFoundOrUnavailable`, and send no
            `messageKey`.
          example: Policy not found!
        messageKey:
          type: string
          description: >-
            Stable key for the error, safe to match on in code. Not returned by
            every service.
          example: PolicyNotFound
        params:
          type: object
          additionalProperties: true
          description: >-
            Details for some errors (for example `reason`). Not returned by
            every service.
          example:
            reason: NO_DRAFT
    KnowledgeBaseChunkMetadata:
      type: object
      nullable: true
      description: Details from the chunker. `null` for chunks you added yourself.
      properties:
        headerPath:
          type: string
          description: The headings the chunk sits under, outermost first.
          example: Pricing > Enterprise
        page:
          type: integer
          description: Page number (files with pages).
          example: 4
        kind:
          type: string
          enum:
            - prose
            - list
            - code
            - table
            - qa
          description: What the chunk contains.
          example: prose
        tokenCount:
          type: integer
          description: Size of the chunk text in tokens.
          example: 212
        qualityScore:
          type: number
          description: Chunker quality score, 0 to 1.
          example: 0.71
        strategy:
          type: string
          enum:
            - SEMANTIC
            - BY_PARAGRAPH
            - QA_PAIRS
            - BY_PAGE
            - FIXED
            - LLM_GUIDED
          description: >-
            The chunking method actually used (it can differ from the one you
            asked for after a fallback).
          example: SEMANTIC
        context:
          type: string
          description: The sentence added in front of the chunk when `addContext` is on.
          example: >-
            This section lists the support options included in the Enterprise
            plan.
        title:
          type: string
          description: Chunk title chosen by the AI model (`LLM_GUIDED` only).
          example: Enterprise support
        flags:
          type: array
          items:
            type: string
            enum:
              - low_quality
              - too_short
              - oversized
          description: Why the chunk is flagged for review.
          example:
            - too_short
        overlapApplied:
          type: boolean
          example: true
          description: >-
            Only when `overlapTokens` is above 0: whether the start of this
            chunk repeats the end of the chunk before it.
        overlapTokenCount:
          type: integer
          example: 38
          description: 'Only when `overlapApplied` is `true`: how many tokens were repeated.'
        overlapSkipReason:
          type: string
          enum:
            - first_chunk
            - table
            - qa_pair
            - after_table
            - after_qa_pair
            - qa_pairs_strategy
            - last_word_over_overlap
          example: first_chunk
          description: >-
            Only when `overlapApplied` is `false`: why. `first_chunk`: the first
            chunk of the item; `table`: the chunk is a table; `qa_pair`: the
            chunk is a question and its answer; `after_table`: the chunk before
            it is a table; `after_qa_pair`: the chunk before it is a question
            and its answer; `qa_pairs_strategy`: the item uses `QA_PAIRS`;
            `last_word_over_overlap`: the last word of the chunk before it is
            longer than `overlapTokens`.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````

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