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

# Listar chats

> Lista os chats do workspace



## OpenAPI

````yaml GET /v2/workspace/{workspaceId}/chats
openapi: 3.0.1
info:
  title: OpenAPI GPT Maker
  description: Documentação completa da API do GPT Maker
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.gptmaker.ai
security:
  - bearerAuth: []
paths:
  /v2/workspace/{workspaceId}/chats:
    get:
      description: Lista os chats do workspace
      parameters:
        - name: workspaceId
          in: path
          description: ID do workspace
          required: true
          schema:
            type: string
        - name: agentId
          in: query
          description: ID do agente para filtrar os chats
          schema:
            type: string
        - name: page
          in: query
          description: Número da página
          schema:
            type: integer
            format: int32
        - name: pageSize
          in: query
          description: Tamanho da página
          schema:
            type: integer
            format: int32
        - name: query
          in: query
          description: Filtro para o nome do chat
          schema:
            type: string
      responses:
        '200':
          description: Lista de chats
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Chat'
        '400':
          description: Erro inesperado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Erro de token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
components:
  schemas:
    Chat:
      type: object
      properties:
        humanTalk:
          type: boolean
          description: Indica se o chat está no controle de um humano ou do agente.
        userPicture:
          type: string
          description: Imagem do usuário que assumiu o atendimento
          nullable: true
        messageUserName:
          type: string
          description: Nome do usuário que enviou a mensagem
          nullable: true
        read:
          type: boolean
          description: Indica se o chat está lido
        role:
          type: string
          description: Função no chat
        agentName:
          type: string
          description: Nome do agente
        agentId:
          type: string
          description: ID do agente
        whatsappPhone:
          type: string
          description: Número do WhatsApp
        finished:
          type: boolean
          description: Indica se o chat está finalizado
        avatar:
          type: string
          description: Avatar do assistente
        title:
          type: string
          description: Título do chat
          nullable: true
        type:
          type: string
          description: Tipo de chat
        userName:
          type: string
          description: Nome do usuário
          nullable: true
        userId:
          type: string
          description: ID do usuário
          nullable: true
        picture:
          type: string
          description: Imagem associada ao chat
        conversationType:
          type: string
          description: Tipo de conversa
        createdAt:
          type: integer
          description: Data de criação
        name:
          type: string
          description: Nome do chat
        recipient:
          type: string
          description: Destinatário do chat
        id:
          type: string
          description: ID do chat
        time:
          type: integer
          description: Hora do chat
        unReadCount:
          type: integer
          description: Contagem de não lidos
        conversation:
          type: string
          description: Conversa
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
    Error403:
      required:
        - error
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````