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

# ニュースレターのライブ更新を購読する

> デバイスを登録してチャンネルのライブカウンターアップデートを行います。
を `newsletter.message` ウェブフックとして配信します。 WhatsApp がサブスクリプションを付与する期間は
短時間です（確認された期間は 90 秒）。GOWA は、有効期限が
切れる前と再接続後に、登録が解除されるまで更新を続けます。 サブスクリプション
はメモリ内に保存され、再起動後も生き残りません。




## OpenAPI

````yaml /ja/openapi.yml post /newsletter/live-updates
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:
  /newsletter/live-updates:
    post:
      tags:
        - newsletter
      summary: ニュースレターのライブ更新を購読する
      description: |
        デバイスを登録してチャンネルのライブカウンターアップデートを行います。
        を `newsletter.message` ウェブフックとして配信します。 WhatsApp がサブスクリプションを付与する期間は
        短時間です（確認された期間は 90 秒）。GOWA は、有効期限が
        切れる前と再接続後に、登録が解除されるまで更新を続けます。 サブスクリプション
        はメモリ内に保存され、再起動後も生き残りません。
      operationId: subscribeNewsletterLiveUpdates
      parameters:
        - $ref: '#/components/parameters/DeviceIdHeader'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - newsletter_id
              properties:
                newsletter_id:
                  type: string
                  example: 120363024512399999@newsletter
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewsletterLiveUpdatesResponse'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '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:
    NewsletterLiveUpdatesResponse:
      type: object
      properties:
        code:
          type: string
          example: SUCCESS
        message:
          type: string
          example: Success subscribe newsletter live updates
        results:
          $ref: '#/components/schemas/NewsletterLiveUpdatesSubscription'
    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: 追加データ
    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: 追加データ
    NewsletterLiveUpdatesSubscription:
      type: object
      properties:
        newsletter_id:
          type: string
          example: 120363024512399999@newsletter
        duration_seconds:
          type: integer
          example: 90
        expires_at:
          type: string
          example: '2026-10-28T17:37:28Z'
        renewed_at:
          type: string
          example: '2026-10-28T17:35:58Z'
        last_error:
          type: string
          description: 前回の更新エラーが発生しました。更新が成功した後にクリアされました
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

## Related topics

- [ニュースレターのライブ更新を停止する](https://gowa-docs.mintlify.site/ja/api-reference/newsletter/ニュースレターのライブ更新を停止する.md)
- [Webhooks](https://gowa-docs.mintlify.site/ja/concepts/webhooks.md)
- [ニュースレターメッセージカウンターを取得する](https://gowa-docs.mintlify.site/ja/api-reference/newsletter/ニュースレターメッセージカウンターを取得する.md)
- [ニュースレター（チャンネル）のメタデータを取得する](https://gowa-docs.mintlify.site/ja/api-reference/newsletter/ニュースレター（チャンネル）のメタデータを取得する.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.