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

# Mark Chat Read

> Marks a session chat as read for the authenticated account.



## OpenAPI

````yaml api-reference/openapi/sessions.json POST /api/sessions/{sessionId}/chats/{chatId}/read
openapi: 3.1.0
info:
  title: Recoup API - Sessions
  description: >-
    Sessions — sandboxed runs of an LLM-driven agent with tool use, lifecycle
    hooks, and persistence. Each session pairs one Vercel Sandbox with one or
    more chat threads.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /api/sessions/{sessionId}/chats/{chatId}/read:
    post:
      summary: Mark chat as read
      description: >-
        Records that the authenticated account has read this chat up to the
        current timestamp. This upserts a row in `chat_reads` setting
        `last_read_at = now()`. After a successful call the `hasUnread` flag for
        this chat will be `false` in subsequent `GET
        /api/sessions/{sessionId}/chats` responses.
      operationId: markChatRead
      parameters:
        - name: sessionId
          in: path
          required: true
          description: The id of the parent session.
          schema:
            type: string
        - name: chatId
          in: path
          required: true
          description: The id of the chat to mark as read.
          schema:
            type: string
      responses:
        '200':
          description: Chat marked as read successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarkChatReadResponse'
        '401':
          description: Unauthorized — invalid or missing API key / Bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden — the authenticated account does not own this session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            Not found — no session exists with the given id, the chat does not
            exist, or the chat belongs to a different session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error — the read record could not be persisted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    MarkChatReadResponse:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          enum:
            - true
    Error:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: string
          enum:
            - error
          description: Always `"error"` for error responses.
        error:
          type: string
          description: Human-readable error message.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    BearerAuth:
      type: http
      scheme: bearer

````