> ## 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.

# Get Chats

> Returns chats for the authenticated account. Personal Bearer tokens see only the caller's chats; org keys see chats across the org's member accounts; admin keys see all chats. Each row carries the chat id and the session id needed to build the chat URL.



## OpenAPI

````yaml api-reference/openapi/research.json GET /api/chats
openapi: 3.1.0
info:
  title: Recoup API - Research
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/chats:
    get:
      description: >-
        Returns chats for the authenticated account. Personal Bearer tokens see
        only the caller's chats; org keys see chats across the org's member
        accounts; admin keys see all chats. Each row carries the chat id and the
        session id needed to build the chat URL.
      parameters:
        - name: artist_account_id
          in: query
          description: >-
            Optional. Filter chats to only include those whose owning session's
            `artistId` matches the supplied artist account id. Combine with
            `account_id` to scope by both owner and artist.
          required: false
          schema:
            type: string
            format: uuid
        - name: account_id
          in: query
          description: >-
            Filter to a specific account. Only applicable when the authenticated
            account has access to multiple accounts via organization membership.
          required: false
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Chats retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetChatsResponse'
        '400':
          description: Bad request - invalid query parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetChatsErrorResponse'
        '401':
          description: Unauthorized - invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Forbidden - account_id is not a member of the organization or
            account tried to filter by an account_id they don't have access to
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    GetChatsResponse:
      type: object
      required:
        - status
        - chats
      properties:
        status:
          type: string
          enum:
            - success
          description: Status of the request
          example: success
        chats:
          type: array
          items:
            $ref: '#/components/schemas/ChatRoom'
          description: Array of chat objects
    GetChatsErrorResponse:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: string
          enum:
            - error
          description: Status of the request
        error:
          type: string
          description: Error message describing what went wrong
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    ChatRoom:
      type: object
      required:
        - id
        - title
        - accountId
        - sessionId
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
          description: Chat id.
        title:
          type: string
          description: Display title for the chat.
        accountId:
          type: string
          format: uuid
          description: Owning account for this chat.
        sessionId:
          type: string
          format: uuid
          description: >-
            Session that owns this chat. Combine with `id` to build the chat
            URL: `/sessions/{sessionId}/chats/{id}`.
        updatedAt:
          type: string
          format: date-time
          description: ISO timestamp of the last update.
        artistId:
          type: string
          format: uuid
          nullable: true
          description: >-
            Artist account id this chat's session was created in the context of,
            or `null` when no artist was associated. Inherited from
            `sessions.artist_id` on the owning session.

````