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

# Yeni cihaz ekle

> Çoklu cihaz yönetimi için yeni bir cihaz yuvası oluştur



## OpenAPI

````yaml /tr/openapi.yml post /devices
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:
    post:
      tags:
        - device
      summary: Yeni cihaz ekle
      description: Çoklu cihaz yönetimi için yeni bir cihaz yuvası oluştur
      operationId: addDevice
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                device_id:
                  type: string
                  description: >-
                    İsteğe bağlı özel cihaz kimliği. Belirtilmezse otomatik
                    olarak oluşturulur.
                  example: my-custom-device-id
                webhook_url:
                  type: string
                  description: >-
                    İsteğe bağlı, cihaza özel webhook URL’si. Ayarlanırsa bu
                    cihaza ait olaylar genel webhook yerine buraya gönderilir.
                  example: https://device-webhook.example.com/handler
                webhook_secret:
                  type: string
                  description: >-
                    Cihaza özel webhook yüklerini imzalamak için kullanılan
                    isteğe bağlı gizli anahtar (HMAC).
                  example: super-secret-key
                webhook_events:
                  type: string
                  description: >-
                    Cihaza özel webhook’a iletilecek olay adlarının virgülle
                    ayrılmış isteğe bağlı listesi. Boş olması tüm olaylar
                    anlamına gelir.
                  example: message,message.ack
                webhook_insecure_skip_verify:
                  type: boolean
                  description: >-
                    İsteğe bağlı. Cihaza özel webhook’a teslim sırasında TLS
                    sertifikası doğrulamasını atla.
                  example: false
      responses:
        '200':
          description: Tamam
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceAddResponse'
        '400':
          description: Geçersiz İstek
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '500':
          description: Dahili Sunucu Hatası
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInternalServer'
components:
  schemas:
    DeviceAddResponse:
      type: object
      properties:
        code:
          type: string
          example: SUCCESS
        message:
          type: string
          example: Device added
        status:
          type: integer
          example: 200
        results:
          type: object
          properties:
            id:
              type: string
              example: my-device-id
            display_name:
              type: string
              example: John Doe
            state:
              type: string
              enum:
                - disconnected
                - connecting
                - connected
                - logged_in
              example: disconnected
            jid:
              type: string
              example: 628123456789@s.whatsapp.net
            created_at:
              type: string
              format: date-time
              example: '2024-01-01T00:00:00Z'
            webhook_url:
              type: string
              description: >-
                Oluşturulurken belirtildiyse geri döndürülen cihaza özel webhook
                URL adresi
              example: https://device-webhook.example.com/handler
            webhook_secret:
              type: string
              description: >-
                Oluşturulurken belirtildiyse geri döndürülen cihaza özel webhook
                sırrı
              example: super-secret-key
            webhook_events:
              type: string
              description: >-
                Oluşturulurken belirtildiyse geri döndürülen cihaza özel olay
                izin listesi
              example: message,message.ack
            webhook_insecure_skip_verify:
              type: boolean
              description: >-
                Oluşturulurken belirtildiyse geri döndürülen cihaza özel TLS
                doğrulama ayarı
              example: false
    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
    ErrorInternalServer:
      type: object
      properties:
        code:
          type: string
          example: INTERNAL_SERVER_ERROR
          description: SYSTEM_CODE_ERROR
        message:
          type: string
          example: you are not loggin
          description: Ayrıntılı hata mesajı
        results:
          type: object
          example: null
          description: ek veriler
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

## Related topics

- [Çoklu Cihaz ve Cihaz Seçimi](https://gowa-docs.mintlify.site/tr/concepts/multidevice.md)
- [Grup oluştur ve katılımcı ekle](https://gowa-docs.mintlify.site/tr/api-reference/group/grup-oluştur-ve-katılımcı-ekle.md)
- [Gruba daha fazla katılımcı ekle](https://gowa-docs.mintlify.site/tr/api-reference/group/gruba-daha-fazla-katılımcı-ekle.md)
- [Cihazı yeniden bağla](https://gowa-docs.mintlify.site/tr/api-reference/device/cihazı-yeniden-bağla.md)
- [WhatsApp sunucusuna yeniden bağlan](https://gowa-docs.mintlify.site/tr/api-reference/app/whatsapp-sunucusuna-yeniden-bağlan.md)


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