> ## 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 post /chat/{chat_jid}/archive
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:
  /chat/{chat_jid}/archive:
    post:
      tags:
        - chat
      summary: チャットをアーカイブまたはアーカイブ解除
      description: チャット会話をアーカイブまたはアーカイブ解除します。 アーカイブされたチャットはメインチャットリストから非表示になります。
      operationId: archiveChat
      parameters:
        - $ref: '#/components/parameters/DeviceIdHeader'
        - in: path
          name: chat_jid
          schema:
            type: string
          required: true
          description: >-
            JIDチャット(例えば、グループ用の個別またはgroupid@g.us用の電話@s.whatsapp.net)。
            Percent-encoded values (例 groupid%40g.us) は受け入れられます。
          example: 6289685028129@s.whatsapp.net
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                archived:
                  type: boolean
                  example: true
                  description: チャットをアーカイブするか (true)、アーカイブ解除するか (false)
              required:
                - archived
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchiveChatResponse'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '401':
          description: 権限がありません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorUnauthorized'
        '404':
          description: チャットが見つかりません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorNotFound'
        '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:
    ArchiveChatResponse:
      type: object
      properties:
        status:
          type: integer
          example: 200
        code:
          type: string
          example: SUCCESS
        message:
          type: string
          example: Chat archived successfully
        results:
          type: object
          properties:
            status:
              type: string
              example: success
            message:
              type: string
              example: Chat archived successfully
            chat_jid:
              type: string
              example: 6289685028129@s.whatsapp.net
            archived:
              type: boolean
              example: true
    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: 追加データ
    ErrorNotFound:
      type: object
      properties:
        code:
          type: string
          example: 404
          description: HTTP ステータスコードです
        message:
          type: string
          example: Chat not found
          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: 追加データ
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

## Related topics

- [チャット一覧を取得する](https://gowa-docs.mintlify.site/ja/api-reference/chat/チャット一覧を取得する.md)
- [クイックスタート](https://gowa-docs.mintlify.site/ja/quickstart.md)
- [インストール](https://gowa-docs.mintlify.site/ja/installation.md)
- [APIリファレンス](https://gowa-docs.mintlify.site/ja/api-reference/introduction.md)
- [僅用於中文](https://gowa-docs.mintlify.site/ja/api-reference/chat/僅用於中文.md)


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