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

# チャット一覧を取得する

> 基本情報とのチャットの会話のリストを取得します



## OpenAPI

````yaml /ja/openapi.yml get /chats
openapi: 3.0.0
info:
  title: WhatsApp API マルチデバイス
  version: 9.7.0
  description: |
    この API は API 経由で whatsapp を送信するために使用されます。

    Web ダッシュボードは別のプロジェクトです (gowa-ui); サーバーは
    最新のリリースアセットをダウンロードし、`/`で動作します（または、
    APP_UI_ENABLED=falseの場合はJSONバナーを返します）。

    デバイススコープ:
    - すべてのデバイススコープの REST コールで `X-Device-Id` を送信します。
    - WebSocket: `/wsに接続しますか？device_id=<id> ` 。
    - WebSocket 認証（Basic Auth が有効な場合）: ブラウザーは WebSocket 接続で
      Authorization ヘッダーを設定できないため、クエリ文字列にも
      `&authorization=<base64(user:pass)>` を渡してください。 認証情報が URL に表示されるため、本番環境では
      TLS を使用してください。
servers:
  - url: http://localhost:3000
security:
  - basicAuth: []
tags:
  - name: app
    description: Whatsappサーバーへの初期接続
  - name: device
    description: マルチデバイスサポートのためのデバイス管理
  - name: user
    description: 情報の取得
  - name: send
    description: メッセージ (テキスト/イメージ/ファイル/ビデオ) を送信します。
  - name: message
    description: メッセージ操作 (revoke/react/update)
  - name: call
    description: 通話管理 (着信拒否)
  - name: chat
    description: チャットとメッセージ
  - name: group
    description: グループ設定
  - name: newsletter
    description: ニュースレターの設定
  - name: chatwoot
    description: カスタマーサポートのためのChatwoot統合
paths:
  /chats:
    get:
      tags:
        - chat
      summary: チャット一覧を取得する
      description: 基本情報とのチャットの会話のリストを取得します
      operationId: listChats
      parameters:
        - $ref: '#/components/parameters/DeviceIdHeader'
        - name: limit
          in: query
          schema:
            type: integer
            default: 25
            maximum: 100
          description: 返信するチャットの最大数
        - name: offset
          in: query
          schema:
            type: integer
            default: 0
          description: スキップするチャットの数（ページネーション用）
        - name: search
          in: query
          schema:
            type: string
          description: チャットを名前で検索
        - name: has_media
          in: query
          schema:
            type: boolean
            default: false
          description: メディア メッセージを含むチャットをフィルター
        - name: archived
          in: query
          schema:
            type: boolean
          description: >-
            アーカイブされた状態でフィルタします。 true = アーカイブのみ、false = アーカイブされていないだけです。
            すべてのチャットを返します。
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatListResponse'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '401':
          description: 権限がありません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorUnauthorized'
        '500':
          description: 内部サーバーエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInternalServer'
components:
  parameters:
    DeviceIdHeader:
      name: X-Device-Id
      in: header
      required: false
      description: |
        マルチデバイスサポート用のデバイス識別子 複数のデバイスが登録されている場合に必要です。
        1つのデバイスのみ登録されている場合は、デフォルトとして使用されます。
        `device_id`クエリパラメータとして提供することもできます。
      schema:
        type: string
        example: my-device-id
  schemas:
    ChatListResponse:
      type: object
      properties:
        code:
          type: string
          example: SUCCESS
        message:
          type: string
          example: Success get chat list
        results:
          type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/Chat'
            pagination:
              type: object
              properties:
                limit:
                  type: integer
                  example: 25
                offset:
                  type: integer
                  example: 0
                total:
                  type: integer
                  example: 150
    ErrorBadRequest:
      type: object
      properties:
        code:
          type: string
          example: 400
          description: HTTP ステータスコードです
        message:
          type: string
          example: field cannot be blank
          description: 詳細エラーメッセージ
        results:
          type: object
          example: null
          description: 追加データ
    ErrorUnauthorized:
      type: object
      properties:
        code:
          type: string
          example: 401
          description: HTTP ステータスコードです
        message:
          type: string
          example: Unauthorized access
          description: 詳細エラーメッセージ
        results:
          type: object
          example: null
          description: 追加データ
    ErrorInternalServer:
      type: object
      properties:
        code:
          type: string
          example: INTERNAL_SERVER_ERROR
          description: システムのコードにエラー
        message:
          type: string
          example: you are not loggin
          description: 詳細エラーメッセージ
        results:
          type: object
          example: null
          description: 追加データ
    Chat:
      type: object
      properties:
        jid:
          type: string
          example: 6289685028129@s.whatsapp.net
          description: チャットJID識別子
        name:
          type: string
          example: John Doe
          description: チャットの表示名
        last_message_time:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
          description: 最後のメッセージのタイムスタンプ
        ephemeral_expiration:
          type: integer
          example: 0
          description: Ephemeral message expiration time in seconds(0 = disabled)
        created_at:
          type: string
          format: date-time
          example: '2024-01-10T08:00:00Z'
          description: チャットの作成日時
        updated_at:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
          description: 最終更新日時
        archived:
          type: boolean
          example: false
          description: チャットをアーカイブしているかどうか
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

## Related topics

- [特定のチャットからメッセージを取得する](https://gowa-docs.mintlify.site/ja/api-reference/chat/特定のチャットからメッセージを取得する.md)
- [保留中のパスキーペアリング状態を取得する](https://gowa-docs.mintlify.site/ja/api-reference/app/保留中のパスキーペアリング状態を取得する.md)
- [サーバーの健全性指標を取得する](https://gowa-docs.mintlify.site/ja/api-reference/app/サーバーの健全性指標を取得する.md)
- [グループに参加する参加リクエストの一覧を取得します](https://gowa-docs.mintlify.site/ja/api-reference/group/グループに参加する参加リクエストの一覧を取得します.md)
- [最新のニュースレター（チャンネル）メッセージを取得する](https://gowa-docs.mintlify.site/ja/api-reference/newsletter/最新のニュースレター（チャンネル）メッセージを取得する.md)


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