> ## 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 /ar/openapi.yml post /chat/{chat_jid}/pin
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:
  /chat/{chat_jid}/pin:
    post:
      tags:
        - chat
      summary: تثبيت أو إلغاء تثبيت الدردشة
      description: تثبيت أو إلغاء تثبيت محادثة الدردشة إلى الجزء العلوي من قائمة الدردشة
      operationId: pinChat
      parameters:
        - $ref: '#/components/parameters/DeviceIdHeader'
        - in: path
          name: chat_jid
          schema:
            type: string
          required: true
          description: >-
            دردشة JID (على سبيل المثال، phone@s.whatsapp.net للأفراد أو
            groupid@g.us للمجموعة). القيم المشفرة (مثلاً: مجموعة%40g.us) مقبولة.
          example: 6289685028129@s.whatsapp.net
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                pinned:
                  type: boolean
                  example: true
                  description: سواء تم تثبيت (صحيح) أو إلغاء تثبيت (نص) الدردشة
              required:
                - pinned
      responses:
        '200':
          description: حسناً
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PinChatResponse'
        '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: |
        معرف الجهاز لدعم الأجهزة المتعددة. مطلوب عند تسجيل أجهزة متعددة.
        إذا تم تسجيل جهاز واحد فقط، فسيتم استخدامه كجهاز افتراضي.
        يمكن أيضا توفيره كعامل استعلام `device_id`.
      schema:
        type: string
        example: my-device-id
  schemas:
    PinChatResponse:
      type: object
      properties:
        code:
          type: string
          example: SUCCESS
        message:
          type: string
          example: Chat pinned successfully
        results:
          type: object
          properties:
            status:
              type: string
              example: success
            message:
              type: string
              example: Chat pinned successfully
            chat_jid:
              type: string
              example: 6289685028129@s.whatsapp.net
            pinned:
              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: SYSTEM_CODE_ERROR
        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/ar/installation.md)
- [أرشفة أو إلغاء أرشفة محادثة](https://gowa-docs.mintlify.site/ar/api-reference/chat/أرشفة-أو-إلغاء-أرشفة-محادثة.md)
- [التعامل مع الوسائط](https://gowa-docs.mintlify.site/ar/examples/media-handling.md)
- [إلغاء إرسال مجدول](https://gowa-docs.mintlify.site/ar/api-reference/send/إلغاء-إرسال-مجدول.md)
- [إرسال حضور الدردشة (مؤشر الكتابة)](https://gowa-docs.mintlify.site/ar/api-reference/send/إرسال-حضور-الدردشة-مؤشر-الكتابة.md)


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