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

# Get a chat

> Retrieve an Extract chat including message history.

Extract thread plus completed messages. An in-flight turn, if any, is `active_turn` — attach the [stream](/api-reference/chats/stream) rather than expecting placeholders in `messages`. Cross-user and non-Extract threads are **404**.


## OpenAPI

````yaml GET /api/v2/chats/{thread_id}/
openapi: 3.1.0
info:
  title: Abacus Docs API
  version: 1.0.0
  description: |
    REST + SSE surface for Abacus Docs on the same host as the web app
    (`https://abacusdocs.com`). Paths are `/api/v2/…`.

    Authenticate with an organisation API key (`sk-abacus-*`) as a Bearer
    token, or an Auth0 access token. Cross-tenant reads return **404**, not
    403. Page-based lists use `?page=` and `?page_size=`.

    Extraction, reprocess, schema tests, and chat turns spend credits.
    See the help centre Credits pages for rates.
  contact:
    name: Abacus Docs
    url: https://abacusdocs.com/contact
servers:
  - url: https://abacusdocs.com
    description: Production (Extract)
security: []
paths:
  /api/v2/chats/{thread_id}/:
    get:
      tags:
        - v2/chats
      summary: Retrieve a chat
      description: >-
        Returns a single Extract chat owned by the caller, including completed
        message history and an optional ``active_turn`` for hybrid mid-turn
        resume (AD-402). Streaming placeholders are omitted from ``messages`` —
        attach via ``active_turn`` + Redis replay. 404 on cross-user /
        non-Extract threads.
      operationId: v2_chats_retrieve
      parameters:
        - in: path
          name: thread_id
          schema:
            type: string
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatDetailResponse'
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
      security:
        - extractApiKey: []
        - bearerAuth: []
        - cookieAuth: []
components:
  schemas:
    ChatDetailResponse:
      type: object
      description: >-
        Detail GET: summary fields + completed history + optional
        ``active_turn``.
      properties:
        id:
          type: integer
          readOnly: true
        thread_id:
          type: string
          readOnly: true
        title:
          type: string
          readOnly: true
        workflow_type:
          type:
            - string
            - 'null'
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
        is_active:
          type: boolean
          readOnly: true
        message_count:
          type: integer
          readOnly: true
        batch_count:
          type: integer
          readOnly: true
        attachment_count:
          type: integer
          readOnly: true
        linked_count:
          type: integer
          readOnly: true
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ChatHistoryMessage'
        active_turn:
          oneOf:
            - $ref: '#/components/schemas/ActiveTurn'
            - type: 'null'
      required:
        - active_turn
        - attachment_count
        - batch_count
        - created_at
        - id
        - is_active
        - linked_count
        - message_count
        - messages
        - thread_id
        - title
        - updated_at
        - workflow_type
    ChatHistoryMessage:
      type: object
      description: >-
        One message row on ``GET /api/v2/chats/<thread_id>/`` (AD-402 hybrid
        load).
      properties:
        id:
          type: integer
        role:
          type: string
        content:
          type: string
        status:
          type: string
        turn_id:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
      required:
        - content
        - created_at
        - id
        - role
        - status
    ActiveTurn:
      type: object
      description: >-
        In-flight durable turn framing for hybrid mid-turn load (AD-402
        §3.11.2).
      properties:
        turn_id:
          type: string
        user_msg_id:
          type:
            - integer
            - 'null'
        assistant_msg_id:
          type:
            - integer
            - 'null'
        stream_cursor:
          type: string
      required:
        - stream_cursor
        - turn_id
  securitySchemes:
    extractApiKey:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: |
        Organisation API key from Settings → API / `/api/keys/`. The secret is
        shown once. Send `Authorization: Bearer sk-abacus-…`. One active key
        per organisation. Ingest (`/api/v2/ingest/*`) refuses API keys — that
        surface is Auth0-only with `ingest:read` / `ingest:write` scopes.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Auth0 access token for a signed-in user. Send `Authorization: Bearer
        <token>`.

        The SPA and desktop agent use this. Prefer an organisation API key for

        server-to-server integrations.
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid
      description: |
        Django session cookie from a browser login. Present so the web app can
        call `/api/v2` without a header. Do not rely on this for integrations.

````