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

# List messages

> List messages in a thread.

Returns all messages in a thread in chronological order. Use this after a run completes to read the agent's response.

When the agent used file search, each retrieved chunk's source tracing fields are appended to the assistant message content: `chunk_id`, `page`, `lines`, and `section`. Use `chunk_id` to call the chunk endpoint for full Markdown provenance and the `file_id` of the source document.


## OpenAPI

````yaml get /v1/threads/{thread_id}/messages
openapi: 3.1.0
info:
  title: SeekrFlow API
  description: SeekrFlow API Documentation
  termsOfService: http://www.seekr.com/support
  contact:
    name: Seekr API Support
    url: http://www.seekr.com/contact
    email: contact@seekr.com
  version: 5.30.1
servers:
  - url: https://flow.seekr.com
    description: SeekrBuild server base URL
security: []
paths:
  /v1/threads/{thread_id}/messages:
    get:
      tags:
        - Threads
      summary: List messages
      description: List messages in a thread.
      operationId: list_messages_endpoint_v1_threads__thread_id__messages_get
      parameters:
        - name: thread_id
          in: path
          required: true
          schema:
            type: string
            title: Thread Id
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 20
            title: Limit
        - name: order
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/OrderEnum'
            default: desc
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
        - name: include_parts
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include Parts
        - name: expand_part_payloads
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Expand Part Payloads
        - name: x-team-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Team-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ThreadMessageResponse'
                title: >-
                  Response List Messages Endpoint V1 Threads  Thread Id 
                  Messages Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    OrderEnum:
      type: string
      enum:
        - asc
        - desc
      title: OrderEnum
      description: Options for order query param in list endpoints.
    ThreadMessageResponse:
      properties:
        id:
          type: string
          title: Id
        object:
          type: string
          title: Object
          default: thread.message
        created_at:
          type: string
          format: date-time
          title: Created At
        thread_id:
          type: string
          title: Thread Id
        role:
          type: string
          title: Role
        content:
          anyOf:
            - type: string
            - items:
                oneOf:
                  - $ref: '#/components/schemas/InputText'
                  - $ref: '#/components/schemas/InputImage'
                  - $ref: '#/components/schemas/InputFile'
                discriminator:
                  propertyName: type
                  mapping:
                    input_file:
                      $ref: '#/components/schemas/InputFile'
                    input_image:
                      $ref: '#/components/schemas/InputImage'
                    input_text:
                      $ref: '#/components/schemas/InputText'
              type: array
            - items:
                oneOf:
                  - $ref: '#/components/schemas/OutputText'
                  - $ref: '#/components/schemas/OutputGuardrail'
                discriminator:
                  propertyName: type
                  mapping:
                    output_guardrail:
                      $ref: '#/components/schemas/OutputGuardrail'
                    output_text:
                      $ref: '#/components/schemas/OutputText'
              type: array
          title: Content
        parts:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/MessageTextPart'
                  - $ref: '#/components/schemas/MessageReasoningPart'
                  - $ref: '#/components/schemas/MessageFilePart'
                  - $ref: '#/components/schemas/MessageDataPart'
                  - $ref: '#/components/schemas/MessageToolCallPart'
                  - $ref: '#/components/schemas/MessageToolErrorPart'
                  - $ref: '#/components/schemas/MessageToolResultPart'
                discriminator:
                  propertyName: type
                  mapping:
                    data:
                      $ref: '#/components/schemas/MessageDataPart'
                    file:
                      $ref: '#/components/schemas/MessageFilePart'
                    reasoning:
                      $ref: '#/components/schemas/MessageReasoningPart'
                    text:
                      $ref: '#/components/schemas/MessageTextPart'
                    tool-call:
                      $ref: '#/components/schemas/MessageToolCallPart'
                    tool-error:
                      $ref: '#/components/schemas/MessageToolErrorPart'
                    tool-result:
                      $ref: '#/components/schemas/MessageToolResultPart'
              type: array
            - type: 'null'
          title: Parts
        agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Id
        run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Id
        meta_data:
          additionalProperties: true
          type: object
          title: Meta Data
      type: object
      required:
        - thread_id
        - role
        - content
      title: ThreadMessageResponse
      description: >-
        Thread message shape returned by the thread API.


        `parts` are opt-in so existing clients keep the previous response shape
        by default.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    InputText:
      properties:
        text:
          type: string
          title: Text
        type:
          type: string
          const: input_text
          title: Type
      type: object
      required:
        - text
        - type
      title: InputText
      description: A text input to be sent to the model.
    InputImage:
      properties:
        detail:
          type: string
          enum:
            - high
            - low
            - auto
          title: Detail
        type:
          type: string
          const: input_image
          title: Type
        file_id:
          anyOf:
            - type: string
            - type: 'null'
          title: File Id
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
      type: object
      required:
        - detail
        - type
      title: InputImage
      description: An image input to be sent to the model.
    InputFile:
      properties:
        type:
          type: string
          const: input_file
          title: Type
        file_id:
          type: string
          title: File Id
      type: object
      required:
        - type
        - file_id
      title: InputFile
      description: A file input to be sent to the model.
    OutputText:
      properties:
        text:
          type: string
          title: Text
        type:
          type: string
          const: output_text
          title: Type
        annotations:
          items:
            type: string
          type: array
          title: Annotations
      type: object
      required:
        - text
        - type
        - annotations
      title: OutputText
      description: A text output from the model.
    OutputGuardrail:
      properties:
        type:
          type: string
          const: output_guardrail
          title: Type
        text:
          type: string
          title: Text
        guardrail:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Guardrail
      type: object
      required:
        - type
        - text
        - guardrail
      title: OutputGuardrail
      description: A guardrail output from the model.
    MessageTextPart:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          const: text
          title: Type
        text:
          type: string
          title: Text
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - type
        - text
      title: MessageTextPart
      description: A text part persisted alongside a thread message.
    MessageReasoningPart:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          const: reasoning
          title: Type
        text:
          type: string
          title: Text
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - type
        - text
      title: MessageReasoningPart
      description: A reasoning part persisted alongside a thread message.
    MessageFilePart:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          const: file
          title: Type
        file_id:
          anyOf:
            - type: string
            - type: 'null'
          title: File Id
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        mime_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Mime Type
        detail:
          anyOf:
            - type: string
              enum:
                - high
                - low
                - auto
            - type: 'null'
          title: Detail
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - type
      title: MessageFilePart
      description: A file or image part persisted alongside a thread message.
    MessageDataPart:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          const: data
          title: Type
        data:
          anyOf:
            - {}
            - type: 'null'
          title: Data
        data_ref:
          anyOf:
            - $ref: '#/components/schemas/PublicStoredObjectRef'
            - $ref: '#/components/schemas/StoredObjectRef'
            - type: 'null'
          title: Data Ref
        data_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Data Type
        mime_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Mime Type
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - type
      title: MessageDataPart
      description: A structured data part persisted alongside a thread message.
    MessageToolCallPart:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          const: tool-call
          title: Type
        tool_name:
          type: string
          title: Tool Name
        tool_call_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Call Id
        args:
          anyOf:
            - {}
            - type: 'null'
          title: Args
        args_ref:
          anyOf:
            - $ref: '#/components/schemas/PublicStoredObjectRef'
            - $ref: '#/components/schemas/StoredObjectRef'
            - type: 'null'
          title: Args Ref
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - type
        - tool_name
      title: MessageToolCallPart
      description: A tool-call part persisted alongside a thread message.
    MessageToolErrorPart:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          const: tool-error
          title: Type
        tool_name:
          type: string
          title: Tool Name
        tool_call_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Call Id
        input:
          anyOf:
            - {}
            - type: 'null'
          title: Input
        input_ref:
          anyOf:
            - $ref: '#/components/schemas/PublicStoredObjectRef'
            - $ref: '#/components/schemas/StoredObjectRef'
            - type: 'null'
          title: Input Ref
        mime_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Mime Type
        error_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Text
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - type
        - tool_name
      title: MessageToolErrorPart
      description: A tool-input-error part persisted alongside a thread message.
    MessageToolResultPart:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          const: tool-result
          title: Type
        tool_name:
          type: string
          title: Tool Name
        tool_call_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Call Id
        output:
          anyOf:
            - {}
            - type: 'null'
          title: Output
        output_ref:
          anyOf:
            - $ref: '#/components/schemas/PublicStoredObjectRef'
            - $ref: '#/components/schemas/StoredObjectRef'
            - type: 'null'
          title: Output Ref
        mime_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Mime Type
        is_error:
          type: boolean
          title: Is Error
          default: false
        error_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Text
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - type
        - tool_name
      title: MessageToolResultPart
      description: A tool-result part persisted alongside a thread message.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PublicStoredObjectRef:
      properties:
        object_id:
          type: string
          title: Object Id
        size_bytes:
          type: integer
          title: Size Bytes
        mime_type:
          type: string
          title: Mime Type
        sha256:
          anyOf:
            - type: string
            - type: 'null'
          title: Sha256
        preview_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Preview Text
        truncated:
          type: boolean
          title: Truncated
          default: false
      type: object
      required:
        - object_id
        - size_bytes
        - mime_type
      title: PublicStoredObjectRef
      description: Client-safe reference to an object stored outside the message row.
    StoredObjectRef:
      properties:
        object_id:
          type: string
          title: Object Id
        path:
          anyOf:
            - type: string
            - type: 'null'
          title: Path
        size_bytes:
          type: integer
          title: Size Bytes
        mime_type:
          type: string
          title: Mime Type
        sha256:
          anyOf:
            - type: string
            - type: 'null'
          title: Sha256
        preview_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Preview Text
        truncated:
          type: boolean
          title: Truncated
          default: false
      type: object
      required:
        - object_id
        - size_bytes
        - mime_type
      title: StoredObjectRef
      description: Reference to an object stored outside the message row.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: Authorization Bearer Token
      in: header
      name: Authorization

````