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

# Setel konfigurasi webhook perangkat

> Setel konfigurasi webhook kustom untuk perangkat tertentu. Jika disetel, event webhook untuk perangkat ini
akan dikirim ke URL ini sebagai pengganti URL webhook global. Pengaturan `webhook_secret`,
`webhook_events`, dan `webhook_insecure_skip_verify` pada tingkat perangkat menggantikan pengaturan webhook global untuk perangkat ini.

Setel ke string kosong untuk menghapusnya dan menggunakan webhook global.




## OpenAPI

````yaml /id/openapi.yml patch /devices/{device_id}/webhook
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:
  /devices/{device_id}/webhook:
    patch:
      tags:
        - device
      summary: Setel konfigurasi webhook perangkat
      description: >
        Setel konfigurasi webhook kustom untuk perangkat tertentu. Jika disetel,
        event webhook untuk perangkat ini

        akan dikirim ke URL ini sebagai pengganti URL webhook global. Pengaturan
        `webhook_secret`,

        `webhook_events`, dan `webhook_insecure_skip_verify` pada tingkat
        perangkat menggantikan pengaturan webhook global untuk perangkat ini.


        Setel ke string kosong untuk menghapusnya dan menggunakan webhook
        global.
      operationId: updateDeviceWebhook
      parameters:
        - name: device_id
          in: path
          required: true
          schema:
            type: string
          description: ID perangkat
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                webhook_url:
                  type: string
                  description: >-
                    URL webhook kustom yang digunakan untuk perangkat ini. Setel
                    ke string kosong untuk menghapusnya.
                  example: https://example.com/webhook
                webhook_secret:
                  type: string
                  description: >-
                    Secret opsional yang digunakan untuk menandatangani payload
                    webhook perangkat ini.
                  example: super-secret-key
                webhook_events:
                  type: string
                  description: >-
                    Daftar event yang diizinkan, dipisahkan koma, yang opsional
                    untuk webhook perangkat ini. Kosong berarti semua event.
                  example: message,message.ack
                webhook_insecure_skip_verify:
                  type: boolean
                  description: >-
                    Opsional. Lewati verifikasi sertifikat TLS untuk webhook
                    perangkat ini.
                  example: false
              required:
                - webhook_url
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 200
                  code:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: Device webhook updated
                  results:
                    type: object
                    properties:
                      device_id:
                        type: string
                        description: ID perangkat
                        example: my-device
                      webhook_url:
                        type: string
                        description: URL webhook yang dikonfigurasi
                        example: https://example.com/webhook
                      webhook_secret:
                        type: string
                        description: >-
                          Secret yang digunakan untuk menandatangani payload
                          webhook perangkat ini
                        example: super-secret-key
                      webhook_events:
                        type: string
                        description: >-
                          Daftar event yang diizinkan, dipisahkan koma, untuk
                          webhook perangkat ini
                        example: message,message.ack
                      webhook_insecure_skip_verify:
                        type: boolean
                        description: >-
                          Apakah verifikasi TLS dilewati untuk webhook perangkat
                          ini
                        example: false
        '400':
          description: Permintaan Tidak Valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '404':
          description: Perangkat tidak ditemukan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorNotFound'
        '500':
          description: Kesalahan Internal Server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInternalServer'
components:
  schemas:
    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
    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

- [Ambil konfigurasi webhook perangkat](https://gowa-docs.mintlify.site/id/api-reference/device/ambil-konfigurasi-webhook-perangkat.md)
- [Referensi Konfigurasi](https://gowa-docs.mintlify.site/id/configuration.md)
- [Endpoint webhook Chatwoot per perangkat](https://gowa-docs.mintlify.site/id/api-reference/chatwoot/endpoint-webhook-chatwoot-per-perangkat.md)
- [Dapatkan konfigurasi Chatwoot perangkat](https://gowa-docs.mintlify.site/id/api-reference/chatwoot/dapatkan-konfigurasi-chatwoot-perangkat.md)
- [Daftar konfigurasi Chatwoot per perangkat](https://gowa-docs.mintlify.site/id/api-reference/chatwoot/daftar-konfigurasi-chatwoot-per-perangkat.md)


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