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

# Sematkan atau lepas sematan chat

> Sematkan atau lepas sematan percakapan chat di bagian atas daftar chat



## OpenAPI

````yaml /id/openapi.yml post /chat/{chat_jid}/pin
openapi: 3.0.0
info:
  title: WhatsApp API MultiDevice
  version: 9.7.0
  description: >
    API ini digunakan untuk mengirim pesan WhatsApp melalui API.


    Dashboard web merupakan proyek terpisah (gowa-ui); server mengunduh aset
    rilis

    terbarunya dan menyajikannya di `/` (atau mengembalikan banner JSON saat

    APP_UI_ENABLED=false).


    Cakupan perangkat:

    - Kirim `X-Device-Id` pada semua panggilan REST yang memiliki cakupan
    perangkat.

    - WebSocket: hubungkan ke `/ws?device_id=<id>`.

    - Autentikasi WebSocket (saat autentikasi dasar diaktifkan): browser tidak
    dapat menyetel
      header Authorization pada koneksi WebSocket, sehingga sertakan juga
      `&authorization=<base64(user:pass)>` dalam query string. Gunakan TLS di
      produksi karena kredensial terlihat di URL.
servers:
  - url: http://localhost:3000
security:
  - basicAuth: []
tags:
  - name: app
    description: Koneksi awal ke server WhatsApp
  - name: device
    description: Pengelolaan perangkat untuk dukungan multi-perangkat
  - name: user
    description: Mengambil informasi
  - name: send
    description: Kirim pesan (teks/gambar/berkas/video).
  - name: message
    description: Manipulasi pesan (cabut/beri reaksi/perbarui).
  - name: call
    description: Pengelolaan panggilan (tolak panggilan masuk)
  - name: chat
    description: Percakapan chat dan perpesanan
  - name: group
    description: Pengaturan grup
  - name: newsletter
    description: Pengaturan newsletter
  - name: chatwoot
    description: Integrasi Chatwoot untuk dukungan pelanggan
paths:
  /chat/{chat_jid}/pin:
    post:
      tags:
        - chat
      summary: Sematkan atau lepas sematan chat
      description: Sematkan atau lepas sematan percakapan chat di bagian atas daftar chat
      operationId: pinChat
      parameters:
        - $ref: '#/components/parameters/DeviceIdHeader'
        - in: path
          name: chat_jid
          schema:
            type: string
          required: true
          description: >-
            JID chat (misalnya phone@s.whatsapp.net untuk individu atau
            groupid@g.us untuk grup). Nilai dengan percent-encoding (misalnya
            groupid%40g.us) diterima.
          example: 6289685028129@s.whatsapp.net
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                pinned:
                  type: boolean
                  example: true
                  description: >-
                    Apakah akan menyematkan (true) atau melepas sematan (false)
                    chat
              required:
                - pinned
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PinChatResponse'
        '400':
          description: Permintaan Tidak Valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '401':
          description: Tidak Terautentikasi
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorUnauthorized'
        '404':
          description: Chat Tidak Ditemukan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorNotFound'
        '500':
          description: Kesalahan Internal Server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInternalServer'
components:
  parameters:
    DeviceIdHeader:
      name: X-Device-Id
      in: header
      required: false
      description: >
        Pengenal perangkat untuk dukungan multi-device. Wajib jika beberapa
        perangkat terdaftar.

        Jika hanya satu perangkat terdaftar, perangkat tersebut digunakan
        sebagai default.

        Dapat juga diberikan sebagai parameter kueri `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: Kode Status HTTP
        message:
          type: string
          example: field cannot be blank
          description: Pesan kesalahan terperinci
        results:
          type: object
          example: null
          description: data tambahan
    ErrorUnauthorized:
      type: object
      properties:
        code:
          type: string
          example: 401
          description: Kode Status HTTP
        message:
          type: string
          example: Unauthorized access
          description: Pesan kesalahan terperinci
        results:
          type: object
          example: null
          description: data tambahan
    ErrorNotFound:
      type: object
      properties:
        code:
          type: string
          example: 404
          description: Kode Status HTTP
        message:
          type: string
          example: Chat not found
          description: Pesan kesalahan terperinci
        results:
          type: object
          example: null
          description: data tambahan
    ErrorInternalServer:
      type: object
      properties:
        code:
          type: string
          example: INTERNAL_SERVER_ERROR
          description: SYSTEM_CODE_ERROR
        message:
          type: string
          example: you are not loggin
          description: Pesan kesalahan terperinci
        results:
          type: object
          example: null
          description: data tambahan
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

## Related topics

- [Arsipkan atau batalkan pengarsipan chat](https://gowa-docs.mintlify.site/id/api-reference/chat/arsipkan-atau-batalkan-pengarsipan-chat.md)
- [Buat atau perbarui konfigurasi Chatwoot perangkat](https://gowa-docs.mintlify.site/id/api-reference/chatwoot/buat-atau-perbarui-konfigurasi-chatwoot-perangkat.md)
- [Kirim kehadiran chat (indikator mengetik)](https://gowa-docs.mintlify.site/id/api-reference/send/kirim-kehadiran-chat-indikator-mengetik.md)
- [Endpoint webhook Chatwoot per perangkat](https://gowa-docs.mintlify.site/id/api-reference/chatwoot/endpoint-webhook-chatwoot-per-perangkat.md)
- [Endpoint webhook Chatwoot](https://gowa-docs.mintlify.site/id/api-reference/chatwoot/endpoint-webhook-chatwoot.md)


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