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

# Bir cihazın Chatwoot yapılandırmasını oluştur veya güncelle

> Bu cihazın mesajlarını genel CHATWOOT_* ortam yapılandırması yerine kendi Chatwoot
hedefine (URL + hesap + gelen kutusu + token) yönlendirir.
URL standart biçime dönüştürülüp doğrulanır (yalnızca http/https, gömülü
kimlik bilgileri olmadan; özel/loopback/link-local/metadata adreslerine çözümlenen ana bilgisayarlar
CHATWOOT_ALLOWED_HOSTS üzerinden izin verilmedikçe reddedilir).
Güncellemede boş bir `api_token` veya GET yanıtından geri gönderilen maskelenmiş değer,
kayıtlı token değerini korur. Yapılandırmaya bağlı konuşmalar varsa yönlendirme kimliğinin
(url/hesap/gelen kutusu) değiştirilmesi 409 ile reddedilir; yeniden bağlamak için
yapılandırmayı silip yeniden oluşturun.




## OpenAPI

````yaml /tr/openapi.yml put /devices/{device_id}/chatwoot/config
openapi: 3.0.0
info:
  title: WhatsApp Çoklu Cihaz API’si
  version: 9.7.0
  description: >
    Bu API, API üzerinden WhatsApp mesajları göndermek için kullanılır.


    Web panosu ayrı bir projedir (gowa-ui); sunucu bu projenin

    en son sürüm dosyasını indirir ve `/` yolunda sunar (veya

    APP_UI_ENABLED=false olduğunda bir JSON başlığı döndürür).


    Cihaz kapsamı:

    - Cihaz kapsamındaki tüm REST çağrılarında `X-Device-Id` gönderin.

    - WebSocket: `/ws?device_id=<id>` adresine bağlanın.

    - WebSocket kimlik doğrulaması (temel kimlik doğrulaması etkinken):
    tarayıcılar WebSocket bağlantılarında
      Authorization üst bilgisi ayarlayamaz; bu nedenle sorgu dizesinde ayrıca
      `&authorization=<base64(user:pass)>` geçirin. Kimlik bilgisi URL’de göründüğünden
      üretim ortamında TLS kullanın.
servers:
  - url: http://localhost:3000
security:
  - basicAuth: []
tags:
  - name: app
    description: WhatsApp sunucusuna ilk bağlantı
  - name: device
    description: Çoklu cihaz desteği için cihaz yönetimi
  - name: user
    description: Bilgi alma
  - name: send
    description: Mesaj gönderme (Metin/Görsel/Dosya/Video).
  - name: message
    description: Mesaj işlemleri (geri alma/tepki verme/güncelleme).
  - name: call
    description: Arama yönetimi (gelen aramaları reddetme)
  - name: chat
    description: Sohbetler ve mesajlaşma
  - name: group
    description: Grup ayarları
  - name: newsletter
    description: Bülten ayarları
  - name: chatwoot
    description: Müşteri desteği için Chatwoot entegrasyonu
paths:
  /devices/{device_id}/chatwoot/config:
    put:
      tags:
        - chatwoot
      summary: Bir cihazın Chatwoot yapılandırmasını oluştur veya güncelle
      description: >
        Bu cihazın mesajlarını genel CHATWOOT_* ortam yapılandırması yerine
        kendi Chatwoot

        hedefine (URL + hesap + gelen kutusu + token) yönlendirir.

        URL standart biçime dönüştürülüp doğrulanır (yalnızca http/https, gömülü

        kimlik bilgileri olmadan; özel/loopback/link-local/metadata adreslerine
        çözümlenen ana bilgisayarlar

        CHATWOOT_ALLOWED_HOSTS üzerinden izin verilmedikçe reddedilir).

        Güncellemede boş bir `api_token` veya GET yanıtından geri gönderilen
        maskelenmiş değer,

        kayıtlı token değerini korur. Yapılandırmaya bağlı konuşmalar varsa
        yönlendirme kimliğinin

        (url/hesap/gelen kutusu) değiştirilmesi 409 ile reddedilir; yeniden
        bağlamak için

        yapılandırmayı silip yeniden oluşturun.
      operationId: chatwootUpsertDeviceConfig
      parameters:
        - $ref: '#/components/parameters/ChatwootConfigDeviceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - chatwoot_url
                - account_id
                - inbox_id
              properties:
                chatwoot_url:
                  type: string
                  example: https://chatwoot.example.com
                account_id:
                  type: integer
                  example: 1
                inbox_id:
                  type: integer
                  example: 5
                api_token:
                  type: string
                  description: >-
                    Chatwoot temsilci/bot API token değeri. Oluştururken
                    zorunludur; güncellemede boş (veya maskelenmiş) değer
                    kayıtlı token değerini korur.
                webhook_secret:
                  type: string
                  description: >
                    Bu gelen kutusunun API kanalına ait webhook sırrı.
                    Ayarlandığında

                    CHATWOOT_WEBHOOK_SECRET yerine bu cihaza yönlendirilen tüm
                    webhook

                    isteklerini (`/chatwoot/webhook/{device_id}` ve paylaşılan

                    `/chatwoot/webhook` üzerinde) korur. Kayıtlı değeri korumak
                    için

                    belirtmeyin; kaldırmak için boş bir dize gönderin. API
                    tarafından asla döndürülmez.
                enabled:
                  type: boolean
                  default: true
      responses:
        '200':
          description: Yapılandırma kaydedildi
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: Chatwoot device config saved
                  results:
                    $ref: '#/components/schemas/ChatwootDeviceConfig'
        '400':
          description: >-
            Geçersiz istek (INVALID_REQUEST) veya reddedilen URL
            (INVALID_CHATWOOT_URL)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '404':
          description: Cihaz bulunamadı
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '409':
          description: >-
            Bağlı konuşmalar varken yönlendirme kimliğinin değiştirilmesi
            reddedildi (CONFIG_HAS_LINKED_CONVERSATIONS)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
components:
  parameters:
    ChatwootConfigDeviceId:
      name: device_id
      in: path
      required: true
      description: >-
        Chatwoot yapılandırması hedeflenen cihaz kimliği (veya WhatsApp JID
        değeri)
      schema:
        type: string
        example: my-device-id
  schemas:
    ChatwootDeviceConfig:
      type: object
      description: >-
        Cihaza özel Chatwoot yönlendirme yapılandırması (API token değeri her
        okumada maskelenir)
      properties:
        device_id:
          type: string
          example: my-device-id
        device_jid:
          type: string
          description: >-
            Cihazın WhatsApp JID değeri; oturum açıldığında otomatik olarak
            eklenir (eşleştirmeden önce boştur)
          example: 628123456789@s.whatsapp.net
        chatwoot_url:
          type: string
          example: https://chatwoot.example.com
        account_id:
          type: integer
          example: 1
        inbox_id:
          type: integer
          example: 5
        api_token:
          type: string
          description: Maskelenir; yalnızca son 4 karakter gösterilir
          example: '****1234'
        enabled:
          type: boolean
          example: true
        webhook_url:
          type: string
          description: >-
            Temsilci yanıtlarının bu cihaza yönlendirilmesi için cihazın
            Chatwoot gelen kutusunda ayarlanacak URL
          example: https://gowa.example.com/chatwoot/webhook/my-device-id
        webhook_secret_set:
          type: boolean
          description: >-
            Bu cihazın kendine ait webhook sırrının olup olmadığı (sırrın
            kendisi asla döndürülmez)
          example: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorBadRequest:
      type: object
      properties:
        code:
          type: string
          example: 400
          description: HTTP Durum Kodu
        message:
          type: string
          example: field cannot be blank
          description: Ayrıntılı hata mesajı
        results:
          type: object
          example: null
          description: ek veriler
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

## Related topics

- [Bir cihazın Chatwoot yapılandırmasını sil](https://gowa-docs.mintlify.site/tr/api-reference/chatwoot/bir-cihazın-chatwoot-yapılandırmasını-sil.md)
- [Bir cihazın Chatwoot yapılandırmasını getir](https://gowa-docs.mintlify.site/tr/api-reference/chatwoot/bir-cihazın-chatwoot-yapılandırmasını-getir.md)
- [Chatwoot Entegrasyonu](https://gowa-docs.mintlify.site/tr/integrations/chatwoot.md)
- [Chatwoot webhook uç noktası](https://gowa-docs.mintlify.site/tr/api-reference/chatwoot/chatwoot-webhook-uç-noktası.md)
- [Cihaz webhook yapılandırmasını al](https://gowa-docs.mintlify.site/tr/api-reference/device/cihaz-webhook-yapılandırmasını-al.md)


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