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

# Poll a v2 conversation for its status and the message tail since a seq

> The HITL-04 §6.6 poll primitive — net-new, message+seq shaped.

Distinct from ``GET /{id}/turns`` (cursor-paginated over *turns*): this is
the one round-trip a caller loops on while a turn is parked, returning the
conversation's current ``session_status`` AND every message with
``seq > since_seq``. The SAME primitive serves approval-resume polling
(``awaiting_approval`` → ``active``) and handoff operator-relay polling
(``waiting_for_human`` → ``closed``); the uniform waker generates+persists
the resumed/operator message and the caller's next poll picks it up.

The caller watermarks on the returned ``next_seq`` (the max ``seq`` of the
tail, or the request ``since_seq`` when the tail is empty so an idle poll
never rewinds). Borrows the read-router message-row + worst-of-N delivery-
status plumbing; ordered by ``seq`` ascending. Org-scoped: cross-org /
missing id → 404 before any read.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/conversations/{conversation_id}/messages
openapi: 3.1.0
info:
  title: Feather API
  description: >-
    Unified customer experience platform API. Manages identity, conversations,
    memory, agents, procedures, policies, model routing, knowledge bases,
    integrations, and runtime execution.
  version: 1.87.0
servers:
  - url: https://api-sandbox.featherhq.com
    description: Sandbox
  - url: http://localhost:8000
    description: Local dev
security: []
paths:
  /v1/conversations/{conversation_id}/messages:
    get:
      tags:
        - conversations
      summary: Poll a v2 conversation for its status and the message tail since a seq
      description: >-
        The HITL-04 §6.6 poll primitive — net-new, message+seq shaped.


        Distinct from ``GET /{id}/turns`` (cursor-paginated over *turns*): this
        is

        the one round-trip a caller loops on while a turn is parked, returning
        the

        conversation's current ``session_status`` AND every message with

        ``seq > since_seq``. The SAME primitive serves approval-resume polling

        (``awaiting_approval`` → ``active``) and handoff operator-relay polling

        (``waiting_for_human`` → ``closed``); the uniform waker
        generates+persists

        the resumed/operator message and the caller's next poll picks it up.


        The caller watermarks on the returned ``next_seq`` (the max ``seq`` of
        the

        tail, or the request ``since_seq`` when the tail is empty so an idle
        poll

        never rewinds). Borrows the read-router message-row + worst-of-N
        delivery-

        status plumbing; ordered by ``seq`` ascending. Org-scoped: cross-org /

        missing id → 404 before any read.
      operationId: pollV2ConversationMessages
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Conversation Id
        - name: since_seq
          in: query
          required: false
          schema:
            type: integer
            minimum: -1
            description: >-
              Watermark: return only messages with ``seq > since_seq``
              (exclusive). Message seqs are 0-based, so seed with the default
              ``-1`` to fetch from the very start (includes seq 0), then pass
              the response's ``next_seq`` back.
            default: -1
            title: Since Seq
          description: >-
            Watermark: return only messages with ``seq > since_seq``
            (exclusive). Message seqs are 0-based, so seed with the default
            ``-1`` to fetch from the very start (includes seq 0), then pass the
            response's ``next_seq`` back.
        - name: include_evidence
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              [ENG-670 T3] Attach each message's evidence package (the KB
              sources shown to the model). Off by default — the poll DEFERS the
              large citations column; opt in to load and project it.
            default: false
            title: Include Evidence
          description: >-
            [ENG-670 T3] Attach each message's evidence package (the KB sources
            shown to the model). Off by default — the poll DEFERS the large
            citations column; opt in to load and project it.
        - name: evidence_view
          in: query
          required: false
          schema:
            enum:
              - display
              - full
            type: string
            description: >-
              Serialization view when include_evidence=true. Poll default is
              'full' (staff/audit), matching the transcript page; 'display' is
              the end-user source-card subset.
            default: full
            title: Evidence View
          description: >-
            Serialization view when include_evidence=true. Poll default is
            'full' (staff/audit), matching the transcript page; 'display' is the
            end-user source-card subset.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationMessagesPoll'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ConversationMessagesPoll:
      properties:
        session_status:
          type: string
          title: Session Status
        messages:
          items:
            $ref: '#/components/schemas/src__conversation__schemas__TurnResponse'
          type: array
          title: Messages
        next_seq:
          type: integer
          title: Next Seq
      type: object
      required:
        - session_status
        - messages
        - next_seq
      title: ConversationMessagesPoll
      description: >-
        The poll primitive's response (HITL-04 §6.6).


        Backs ``GET /conversations/{id}/messages?since_seq=N`` — one round-trip

        that returns the conversation's current ``session_status`` *and* every

        message with ``seq > since_seq`` (the new tail). The caller advances its

        watermark to ``next_seq`` and re-polls. The SAME primitive serves both

        approval-resume polling (``awaiting_approval`` → ``active``) and handoff

        operator-relay polling (``waiting_for_human`` → ``closed``).


        ``next_seq`` is the high-water mark to pass back as ``since_seq`` on the

        next poll: the max ``seq`` of the returned ``messages``, or the
        request's

        own ``since_seq`` when the tail is empty (so an idle poll doesn't rewind

        the watermark). The caller watermarks on this exactly as it would on

        :attr:`TurnResponse.message_seqs` after a synchronous turn.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
        retryable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Retryable
        retry_after:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retry After
      type: object
      required:
        - error
        - message
      title: ErrorResponse
      description: Standard error response returned by all API error handlers.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    src__conversation__schemas__TurnResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        session_id:
          type: string
          format: uuid
          title: Session Id
        seq:
          type: integer
          title: Seq
        role:
          type: string
          enum:
            - user
            - assistant
            - system
            - tool
            - system_event
          title: Role
        content:
          type: string
          title: Content
        tool_calls:
          anyOf:
            - items:
                $ref: '#/components/schemas/ToolCall'
              type: array
            - type: 'null'
          title: Tool Calls
        tool_results:
          anyOf:
            - $ref: '#/components/schemas/ToolResult'
            - type: 'null'
        model_used:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Used
        token_count:
          anyOf:
            - $ref: '#/components/schemas/TokenCount'
            - type: 'null'
        latency_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Latency Ms
        is_compacted:
          type: boolean
          title: Is Compacted
          default: false
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        created_at:
          type: string
          format: date-time
          title: Created At
        delivery_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Delivery Status
        authored_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Authored By
        evidence:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/EvidencePackageDisplay'
                - $ref: '#/components/schemas/EvidencePackageFull'
              discriminator:
                propertyName: view
                mapping:
                  display:
                    $ref: '#/components/schemas/EvidencePackageDisplay'
                  full:
                    $ref: '#/components/schemas/EvidencePackageFull'
            - type: 'null'
          title: Evidence
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        sources:
          anyOf:
            - items:
                $ref: '#/components/schemas/TurnSource'
              type: array
            - type: 'null'
          title: Sources
      type: object
      required:
        - id
        - session_id
        - seq
        - role
        - content
        - created_at
      title: TurnResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ToolCall:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          title: Type
          default: function
        function:
          $ref: '#/components/schemas/ToolCallFunction'
      type: object
      required:
        - id
        - function
      title: ToolCall
    ToolResult:
      properties:
        tool_call_id:
          type: string
          title: Tool Call Id
        output:
          type: string
          title: Output
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - tool_call_id
        - output
      title: ToolResult
    TokenCount:
      properties:
        input_tokens:
          type: integer
          title: Input Tokens
        output_tokens:
          type: integer
          title: Output Tokens
        total_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Tokens
      type: object
      required:
        - input_tokens
        - output_tokens
      title: TokenCount
    EvidencePackageDisplay:
      properties:
        view:
          type: string
          const: display
          title: View
          default: display
        schema_version:
          type: integer
          title: Schema Version
          default: 1
        package_id:
          type: string
          format: uuid
          title: Package Id
        conversation_id:
          type: string
          format: uuid
          title: Conversation Id
        message_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Message Id
        turn_id:
          type: string
          format: uuid
          title: Turn Id
        created_at:
          type: string
          format: date-time
          title: Created At
        evidence_status:
          type: string
          enum:
            - complete
            - partial
            - failed
            - not_applicable
          title: Evidence Status
        kb_used:
          type: boolean
          title: Kb Used
          default: false
        items:
          items:
            $ref: '#/components/schemas/EvidenceItemDisplay'
          type: array
          title: Items
      type: object
      required:
        - package_id
        - conversation_id
        - turn_id
        - created_at
        - evidence_status
        - items
      title: EvidencePackageDisplay
      description: >-
        End-user serialization view — source cards only, NO audit internals.


        A distinct model (not :class:`EvidencePackage` with a narrower config)
        so the

        omitted fields are absent from the schema, and so ``view`` yields a
        clean

        tagged union. ``organization_id``, ``agent_id`` and ``status_reason``
        are

        full-only and intentionally not present here.


        ``kb_used`` exists because ``status_reason`` is deliberately full-only:
        several

        of its values (``build_failed``, ``item_cap_applied``,

        ``partial_missing_source_rows``) describe internal packing/DB state that
        an

        end-user surface must not see. But a consumer still has one legitimate
        question

        that ``items=[]`` alone cannot answer — *was the knowledge base
        consulted on

        this turn at all?* An empty card set means "no KB search ran" under

        ``not_applicable`` but "searched, packed nothing" under ``complete``.
        ``kb_used``

        answers that directly instead of making every client hard-code which

        ``evidence_status`` value is the magic one.
    EvidencePackageFull:
      properties:
        schema_version:
          type: integer
          title: Schema Version
          default: 1
        package_id:
          type: string
          format: uuid
          title: Package Id
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        conversation_id:
          type: string
          format: uuid
          title: Conversation Id
        message_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Message Id
        turn_id:
          type: string
          format: uuid
          title: Turn Id
        agent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Agent Id
        created_at:
          type: string
          format: date-time
          title: Created At
        evidence_status:
          type: string
          enum:
            - complete
            - partial
            - failed
            - not_applicable
          title: Evidence Status
        status_reason:
          anyOf:
            - type: string
              enum:
                - complete
                - no_kb_used
                - no_exposed_chunks
                - answerability_suppressed
                - partial_missing_source_rows
                - item_cap_applied
                - build_failed
            - type: 'null'
          title: Status Reason
        items:
          items:
            $ref: '#/components/schemas/EvidenceItem'
          type: array
          title: Items
        view:
          type: string
          const: full
          title: View
          default: full
      type: object
      required:
        - package_id
        - organization_id
        - conversation_id
        - turn_id
        - created_at
        - evidence_status
        - items
      title: EvidencePackageFull
      description: >-
        Staff/audit serialization view — the full envelope plus a ``view`` tag.


        Adds only the ``full`` discriminator literal; every audit field

        (scores/basis/band, ``rag_query_id``, chunk ids, hashes, constraints,

        ``status_reason``) rides through unchanged from
        :class:`EvidencePackage`.
    TurnSource:
      properties:
        title:
          type: string
          title: Title
        url:
          type: string
          title: Url
      type: object
      required:
        - title
        - url
      title: TurnSource
      description: >-
        One KB source link surfaced alongside a white-label assistant reply.


        ``url`` is VERBATIM as the KB document wrote it and MAY BE RELATIVE

        (``uploads/<uuid>.pdf``) — the consumer joins its own base. Deliberately
        not

        scheme-validated the way ``EvidenceProvenance.external_uri`` is; a
        scoped

        exception recorded as **DD-010** in ``docs/design-decisions.md`` (not
        DD-007,

        which governs ``external_uri`` and still requires a scheme). Executable

        schemes are stripped upstream, at extraction.


        ``title`` is heuristic (markdown link text ▸ ``Link for X:`` label ▸
        last path

        segment). Never invented: every value was literally present in the
        document or

        the answer.
    ToolCallFunction:
      properties:
        name:
          type: string
          title: Name
        arguments:
          type: string
          title: Arguments
      type: object
      required:
        - name
        - arguments
      title: ToolCallFunction
    EvidenceItemDisplay:
      properties:
        citation_marker:
          anyOf:
            - type: string
            - type: 'null'
          title: Citation Marker
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        short_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Short Label
        document_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Document Title
        version_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version Number
        section:
          anyOf:
            - $ref: '#/components/schemas/EvidenceSection'
            - type: 'null'
        deep_link:
          anyOf:
            - type: string
            - type: 'null'
          title: Deep Link
        kb_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Kb Id
        kb_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Kb Name
        document_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Document Id
        source_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Provider
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
        external_uri:
          anyOf:
            - type: string
            - type: 'null'
          title: External Uri
      type: object
      title: EvidenceItemDisplay
      description: >-
        One end-user source card — the ``display`` projection of an

        :class:`EvidenceItem`.


        Carries card fields plus SOURCE IDENTITY (which KB, which document,
        where it

        came from). Audit internals stay structurally absent: raw/basis/band
        scores,

        ``content_sha256``, ``chunk_id`` / ``chunk_index``, ``rag_query_id``,

        ``prompt_order`` and usage constraints are never emitted here.


        Source identity is on the end-user card deliberately. A white-label
        consumer

        renders "Sources shown to the model" in its own UI and needs to say
        *which*

        source, and to link its own record for it — which needs the ids, not
        just a

        human label. None of these fields expose retrieval behavior.
    EvidenceItem:
      properties:
        evidence_id:
          type: string
          format: uuid
          title: Evidence Id
        rag_query_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Rag Query Id
        attribution_level:
          type: string
          const: exposed
          title: Attribution Level
          default: exposed
        prompt_order:
          anyOf:
            - type: integer
            - type: 'null'
          title: Prompt Order
        provenance:
          $ref: '#/components/schemas/EvidenceProvenance'
        position:
          anyOf:
            - $ref: '#/components/schemas/EvidencePosition'
            - type: 'null'
        score:
          anyOf:
            - $ref: '#/components/schemas/EvidenceScore'
            - type: 'null'
        usage_constraints:
          anyOf:
            - $ref: '#/components/schemas/EvidenceUsageConstraints'
            - type: 'null'
        display:
          anyOf:
            - $ref: '#/components/schemas/EvidenceDisplay'
            - type: 'null'
        source_trust:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Trust
        scan_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Scan Status
      type: object
      required:
        - evidence_id
        - provenance
      title: EvidenceItem
    EvidenceSection:
      properties:
        path_titles:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Path Titles
        path_numbers:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Path Numbers
        display_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Label
        confidence:
          type: string
          enum:
            - parsed
            - derived
            - unknown
          title: Confidence
          default: unknown
      type: object
      title: EvidenceSection
      description: A document section path — never a fabricated ``§N``.
    EvidenceProvenance:
      properties:
        kb_id:
          type: string
          format: uuid
          title: Kb Id
        kb_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Kb Name
        document_id:
          type: string
          format: uuid
          title: Document Id
        document_title:
          type: string
          title: Document Title
        version_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Version Id
        version_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version Number
        source_type:
          type: string
          title: Source Type
        source_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Provider
        deep_link:
          anyOf:
            - type: string
            - type: 'null'
          title: Deep Link
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
        external_uri:
          anyOf:
            - type: string
            - type: 'null'
          title: External Uri
        inline_sources:
          items:
            $ref: '#/components/schemas/InlineSource'
          type: array
          title: Inline Sources
        filename:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename
        section:
          anyOf:
            - $ref: '#/components/schemas/EvidenceSection'
            - type: 'null'
        chunk_id:
          type: string
          title: Chunk Id
        chunk_index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Chunk Index
        content_sha256:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Sha256
        last_processed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Processed At
      type: object
      required:
        - kb_id
        - document_id
        - document_title
        - source_type
        - chunk_id
      title: EvidenceProvenance
    EvidencePosition:
      properties:
        type:
          type: string
          const: text
          title: Type
          default: text
        start_char:
          anyOf:
            - type: integer
            - type: 'null'
          title: Start Char
        end_char:
          anyOf:
            - type: integer
            - type: 'null'
          title: End Char
      type: object
      title: EvidencePosition
    EvidenceScore:
      properties:
        retrieval_score_raw:
          anyOf:
            - type: number
            - type: 'null'
          title: Retrieval Score Raw
        retrieval_score_display:
          anyOf:
            - type: number
            - type: 'null'
          title: Retrieval Score Display
        score_basis:
          type: string
          enum:
            - raw_hybrid_dotproduct
            - minmax_normalized
            - reranked_original_score
            - grouped_unranked
          title: Score Basis
        band:
          type: string
          enum:
            - high
            - medium
            - low
            - unknown
          title: Band
          default: unknown
        calibrated:
          type: boolean
          title: Calibrated
          default: false
      type: object
      required:
        - score_basis
      title: EvidenceScore
      description: >-
        Relevance signal — NOT a probability (``calibrated=False`` always in
        v1).
    EvidenceUsageConstraints:
      properties:
        sensitivity:
          anyOf:
            - type: string
              enum:
                - public
                - internal
                - confidential
                - restricted
            - type: 'null'
          title: Sensitivity
        sensitivity_level:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sensitivity Level
        visibility_mode:
          anyOf:
            - type: string
              enum:
                - org_wide
                - audience
            - type: 'null'
          title: Visibility Mode
        audience_tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Audience Tags
        constraint_source:
          type: string
          enum:
            - acl_columns
            - metadata
            - none
          title: Constraint Source
          default: none
        raw:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Raw
      type: object
      title: EvidenceUsageConstraints
      description: Carried, not enforced (v1).
    EvidenceDisplay:
      properties:
        label:
          type: string
          title: Label
        short_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Short Label
        citation_marker:
          anyOf:
            - type: string
            - type: 'null'
          title: Citation Marker
      type: object
      required:
        - label
      title: EvidenceDisplay
    InlineSource:
      properties:
        title:
          type: string
          title: Title
        url:
          type: string
          title: Url
      type: object
      required:
        - title
        - url
      title: InlineSource
      description: >-
        One ``{title, url}`` source link written INSIDE a KB document's text.


        Extracted at retrieval time by :mod:`src.knowledge_base.inline_sources`
        and

        persisted here because chunk text is unrecoverable at any read surface.


        ``url`` is VERBATIM as the document wrote it and MAY BE RELATIVE

        (``uploads/x.pdf``). This is deliberately NOT ``external_uri``, and it
        is

        deliberately NOT run through :func:`_safe_uri_or_none`: a scheme is not

        required here. This is a scoped exception recorded as **DD-010** in

        ``docs/design-decisions.md`` — NOT a relaxation of DD-007, which governs
        a

        different field (``external_uri``) and still requires a scheme. The
        value

        here is a customer's own document link rendered in that customer's own

        white-label UI, which joins its own base. Executable schemes are still

        stripped, at extraction.


        ``title`` is heuristic (markdown link text ▸ ``Link for X:`` label ▸
        last path

        segment). Accuracy is a later pass; the honesty rule is only that
        nothing is

        invented — every value here was literally present in the document.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````