> ## 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` webhooks. ويمنح WhatsApp الاشتراك ل
مدة قصيرة (90 ثانية)؛ تقوم GOWA بتجديدها قبل أن تنتهي صلاحية
وبعد إعادة الاتصال حتى يتم إلغاء الاشتراك. الاشتراكات
محفوظة في الذاكرة ولا تنجو من إعادة التشغيل.




## OpenAPI

````yaml /ar/openapi.yml post /newsletter/live-updates
openapi: 3.0.0
info:
  title: واتسآب API متعدد الأجهزة
  version: 9.7.0
  description: >
    يتم استخدام هذا API لإرسال أي تطبيق عبر API.


    لوحة المعلومات هي مشروع منفصل (gowa-ui)؛ يقوم الخادم بتنزيل أحدث أصول
    الإصدار

    ويخدمه في `/` (أو يرجع لافتة JSON عندما

    APP_UI_ENABLED=false).


    تحديد الجهاز:

    - إرسال `X-Device-Id` على جميع مكالمات REST على نطاق الجهاز.

    - WebSocket: الاتصال بـ `/w?جهاز_id=<id>`.

    - مصادقة WebSocket (عندما يتم تمكين المصادقة الأساسية): المتصفحات لا يمكن
    تعيين
      رأس التفويض على اتصالات WebSocket ، كذلك اجتاز
      `&authorization=<base64(user:pass)>` في سلسلة الاستفسار. استخدم TLS في إنتاج
      لأن بيانات الاعتماد مرئية في عنوان URL.
servers:
  - url: http://localhost:3000
security:
  - basicAuth: []
tags:
  - name: app
    description: الاتصال الأولي بخادم Whatsapp
  - name: device
    description: إدارة الجهاز لدعم الأجهزة المتعددة
  - name: user
    description: الحصول على المعلومات
  - name: send
    description: إرسال رسالة (نص/صورة/ملف/فيديو).
  - name: message
    description: التلاعب بالرسالة (إلغائ/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` webhooks. ويمنح 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: حسناً
          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: |
        معرف الجهاز لدعم الأجهزة المتعددة. مطلوب عند تسجيل أجهزة متعددة.
        إذا تم تسجيل جهاز واحد فقط، فسيتم استخدامه كجهاز افتراضي.
        يمكن أيضا توفيره كعامل استعلام `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: SYSTEM_CODE_ERROR
        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/ar/api-reference/newsletter/إيقاف-تجديد-التحديثات-المباشرة-للنشرة-الإخبارية.md)
- [قائمة التحديثات المباشرة للاشتراكات في الجهاز](https://gowa-docs.mintlify.site/ar/api-reference/newsletter/قائمة-التحديثات-المباشرة-للاشتراكات-في-الجهاز.md)
- [الاشتراك في وجود جهة الاتصال](https://gowa-docs.mintlify.site/ar/api-reference/user/الاشتراك-في-وجود-جهة-الاتصال.md)
- [مرجع API](https://gowa-docs.mintlify.site/ar/api-reference/introduction.md)
- [قنوات واتساب](https://gowa-docs.mintlify.site/ar/examples/newsletters.md)


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