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

# Read my conversation

> The caller's one conversation with the assistant, on every channel: the newest 50 messages before `cursor`, oldest first. `next` is the cursor to the older page, absent when there is none. A reply that read the week links to it. `openTurns` names the caller's web messages still waiting for their reply (each `turnId` is the one the send returned), whichever page they are on, with `waitMs`: how much longer from this response the reply may still arrive. A turn whose reply did not come within that window is not listed.



## OpenAPI

````yaml /openapi.json get /v1/conversation/messages
openapi: 3.0.0
info:
  title: onosso
  version: 0.0.0
  description: >-
    The household's API: the week, the people and the sessions the web app reads
    and changes.
servers: []
security: []
tags:
  - name: Week
    description: The household's week, day by day.
  - name: People
    description: The people who make up the household.
  - name: Pets
    description: The pets of the house.
  - name: Invites
    description: Links that let someone join.
  - name: Sessions
    description: Where you are signed in.
  - name: Tokens
    description: Your personal API tokens.
  - name: Address
    description: Where the household lives.
  - name: Messages
    description: What each person receives from the product, and when.
  - name: Questions
    description: 'What needs a person: one queue, the same in the app and on WhatsApp.'
  - name: Shopping
    description: 'The household''s one list: places, items and marks.'
  - name: Conversation
    description: >-
      Each person's one conversation with the assistant, the same in the app and
      on WhatsApp.
  - name: MCP
    description: The house for an MCP client such as Claude Desktop, with a personal token.
paths:
  /v1/conversation/messages:
    get:
      tags:
        - Conversation
      summary: Read my conversation
      description: >-
        The caller's one conversation with the assistant, on every channel: the
        newest 50 messages before `cursor`, oldest first. `next` is the cursor
        to the older page, absent when there is none. A reply that read the week
        links to it. `openTurns` names the caller's web messages still waiting
        for their reply (each `turnId` is the one the send returned), whichever
        page they are on, with `waitMs`: how much longer from this response the
        reply may still arrive. A turn whose reply did not come within that
        window is not listed.
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 200
          required: false
          name: cursor
          in: query
      responses:
        '200':
          description: A page of the conversation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      $ref: '#/components/schemas/ConversationMessage'
                  next:
                    type: string
                  openTurns:
                    type: array
                    items:
                      type: object
                      properties:
                        turnId:
                          type: string
                        waitMs:
                          type: integer
                      required:
                        - turnId
                        - waitMs
                required:
                  - messages
                  - openTurns
        '400':
          description: >-
            The request's shape is invalid (`agent.invalid-message`, with
            `details.field` and `details.fieldCode`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainError'
        '401':
          description: The session is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '422':
          description: >-
            `agent.transcript-cursor-invalid`: the cursor is not one this API
            gave.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/RequestTimeout'
      security:
        - session: []
        - token: []
components:
  schemas:
    ConversationMessage:
      type: object
      properties:
        id:
          type: string
        channel:
          type: string
          enum:
            - whatsapp
            - web
            - slack
        role:
          type: string
          enum:
            - user
            - assistant
            - team
        text:
          type: string
        at:
          type: string
          format: date-time
        links:
          type: array
          items:
            type: object
            properties:
              label:
                type: string
              href:
                type: string
            required:
              - label
              - href
        capture:
          $ref: '#/components/schemas/ConversationCapture'
        actions:
          type: array
          items:
            type: object
            properties:
              questionId:
                type: string
              optionId:
                type: string
              label:
                type: string
            required:
              - questionId
              - optionId
              - label
          description: >-
            Chips: the options of the caller's pending questions whose date the
            reply's week read covered; each answers through POST
            /v1/questions/{questionId}/answers. Absent when there are none.
        document:
          type: object
          properties:
            filename:
              type: string
          required:
            - filename
          description: >-
            The document the caller sent from the app, by its name; the file
            itself is never in the conversation. Absent for every other message.
      required:
        - id
        - channel
        - role
        - text
        - at
        - links
    DomainError:
      type: object
      properties:
        code:
          type: string
        details:
          type: object
          additionalProperties:
            nullable: true
      required:
        - code
        - details
    Unauthorized:
      type: object
      properties:
        message:
          type: string
          enum:
            - Unauthorized
        statusCode:
          type: number
          enum:
            - 401
      required:
        - message
        - statusCode
    ConversationCapture:
      type: object
      properties:
        id:
          type: string
          format: uuid
        occurrenceIds:
          type: array
          items:
            type: string
          description: >-
            The week items the capture put in the week, `<activityId>@<date>`,
            by date.
      required:
        - id
        - occurrenceIds
      description: >-
        What the reply wrote to the week, undone as one unit by DELETE
        /v1/conversation/captures/{captureId}. Absent when the reply wrote
        nothing.
    Degraded:
      type: object
      properties:
        code:
          type: string
          enum:
            - request.timeout
            - service.unavailable
        correlationId:
          type: string
      required:
        - code
        - correlationId
  responses:
    ServiceUnavailable:
      description: A dependency is unavailable; retry after Retry-After seconds.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Degraded'
    RequestTimeout:
      description: The request outlived its deadline.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Degraded'
  securitySchemes:
    session:
      type: apiKey
      in: cookie
      name: __Secure-better-auth.session_token
      description: The session cookie set when you sign in to the web app.
    token:
      type: http
      scheme: bearer
      description: >-
        A personal API token (`onss_live_…`), created in Ajustes › Integrações.
        It acts as the person who created it, in the household it was created
        in, on the read routes that list it.

````

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