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

# Belirli bir sohbetin mesajlarını getir

> Belirli bir sohbet konuşmasındaki mesajları filtreleme seçenekleriyle getirir



## OpenAPI

````yaml /tr/openapi.yml get /chat/{chat_jid}/messages
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:
  /chat/{chat_jid}/messages:
    get:
      tags:
        - chat
      summary: Belirli bir sohbetin mesajlarını getir
      description: >-
        Belirli bir sohbet konuşmasındaki mesajları filtreleme seçenekleriyle
        getirir
      operationId: getChatMessages
      parameters:
        - $ref: '#/components/parameters/DeviceIdHeader'
        - in: path
          name: chat_jid
          schema:
            type: string
          required: true
          description: >-
            Sohbet JID değeri (ör. bireysel sohbet için phone@s.whatsapp.net
            veya grup için groupid@g.us). Yüzde kodlamalı değerler (ör.
            groupid%40g.us) kabul edilir.
          example: 6289685028129@s.whatsapp.net
        - name: limit
          in: query
          schema:
            type: integer
            default: 50
            maximum: 100
          description: Döndürülecek en fazla mesaj sayısı
        - name: offset
          in: query
          schema:
            type: integer
            default: 0
          description: Atlanacak mesaj sayısı (sayfalama için)
        - name: start_time
          in: query
          schema:
            type: string
            format: date-time
          description: >-
            Bu zaman damgasından itibaren olan mesajları filtrele (ISO 8601
            biçimi)
        - name: end_time
          in: query
          schema:
            type: string
            format: date-time
          description: Bu zaman damgasına kadar olan mesajları filtrele (ISO 8601 biçimi)
        - name: media_only
          in: query
          schema:
            type: boolean
            default: false
          description: Yalnızca medya içeriği olan mesajları döndür
        - name: is_from_me
          in: query
          schema:
            type: boolean
          description: >-
            Mesajları gönderene göre filtrele (sizin gönderdiğiniz mesajlar için
            true, alınan mesajlar için false). Hem media_only=true hem de
            isFromMe=false belirtildiğinde media_only önceliklidir ve
            gönderenden bağımsız olarak tüm medya mesajlarını döndürür.
        - name: search
          in: query
          schema:
            type: string
          description: Mesajları içerik metnine göre ara
      responses:
        '200':
          description: Tamam
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatMessagesResponse'
        '400':
          description: Geçersiz İstek
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '401':
          description: Yetkisiz
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorUnauthorized'
        '404':
          description: Sohbet bulunamadı
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorNotFound'
        '500':
          description: Dahili Sunucu Hatası
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInternalServer'
components:
  parameters:
    DeviceIdHeader:
      name: X-Device-Id
      in: header
      required: false
      description: >
        Çoklu cihaz desteği için cihaz tanımlayıcısı. Birden fazla cihaz
        kayıtlıysa zorunludur.

        Yalnızca bir cihaz kayıtlıysa varsayılan olarak kullanılır.

        `device_id` sorgu parametresi olarak da belirtilebilir.
      schema:
        type: string
        example: my-device-id
  schemas:
    ChatMessagesResponse:
      type: object
      properties:
        code:
          type: string
          example: SUCCESS
        message:
          type: string
          example: Success get chat messages
        results:
          type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/ChatMessage'
            pagination:
              type: object
              properties:
                limit:
                  type: integer
                  example: 50
                offset:
                  type: integer
                  example: 0
                total:
                  type: integer
                  example: 1250
            chat_info:
              $ref: '#/components/schemas/Chat'
    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
    ErrorUnauthorized:
      type: object
      properties:
        code:
          type: string
          example: 401
          description: HTTP Durum Kodu
        message:
          type: string
          example: Unauthorized access
          description: Ayrıntılı hata mesajı
        results:
          type: object
          example: null
          description: ek veriler
    ErrorNotFound:
      type: object
      properties:
        code:
          type: string
          example: 404
          description: HTTP Durum Kodu
        message:
          type: string
          example: Chat not found
          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
    ChatMessage:
      type: object
      properties:
        id:
          type: string
          example: 3EB0B430B6F8F1D0E053AC120E0A9E5C
          description: Mesaj kimliği
        chat_jid:
          type: string
          example: 6289685028129@s.whatsapp.net
          description: Bu mesajın ait olduğu sohbetin JID değeri
        sender_jid:
          type: string
          example: 6289685028129@s.whatsapp.net
          description: Gönderenin JID değeri
        sender_display_name:
          type: string
          example: Saved Contact
          description: >-
            Bu yanıt oluşturulurken dinamik olarak çözümlenen, insan tarafından
            okunabilir gönderen etiketi; mesajla birlikte saklanmaz. Diğer
            gönderenler için sırasıyla kayıtlı kişinin tam adı, kayıtlı kişinin
            profil adı, işletme adı, JID kullanıcı bölümü ve ham JID tercih
            edilir. Etkin hesap için sırasıyla cihazın görünen adı (yoksa
            kayıtlı hesap profil adı), hesap JID kullanıcı bölümü, hesap JID
            değeri, gönderen JID kullanıcı bölümü ve ham gönderen JID değeri
            tercih edilir. Bu nedenle bir kişinin adının değiştirilmesi, geçmiş
            mesajlar için döndürülen etiketi değiştirebilir. `sender_jid` sabit
            gönderen tanımlayıcısı olarak kalır.
        content:
          type: string
          example: Hello, how are you?
          description: Mesajın metin içeriği
        timestamp:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
          description: Mesajın zaman damgası
        is_from_me:
          type: boolean
          example: false
          description: Bu mesajın mevcut kullanıcı tarafından gönderilip gönderilmediği
        media_type:
          type: string
          example: image
          nullable: true
          description: >-
            Medya türü (resim, video, ses, belge vb.). `call` değeri, kayıtlı
            bir gelen arama kaydını belirtir.
        reactions:
          type: array
          description: Bu mesaja eklenen emoji tepkileri
          items:
            $ref: '#/components/schemas/ChatReaction'
        call_metadata:
          type: string
          example: '{"call_id":"ABC","auto_rejected":false}'
          description: >-
            media_type `call` olduğunda arama ayrıntılarını içeren JSON dizesi.
            Geçerli değilse dahil edilmez (Go json omitempty ile uyumludur).
        referral_metadata:
          type: string
          example: '{"ctwa_clid":"clid_123","source_app":"whatsapp"}'
          description: >-
            Mesaj bir Click-to-WhatsApp reklamından geldiyse Meta Ads
            yönlendirme/ilişkilendirme ayrıntılarını içeren JSON dizesi. Geçerli
            değilse dahil edilmez (Go json omitempty ile uyumludur).
        context_metadata:
          type: string
          example: '{"replied_to_id":"AC625C65EA7143E71D784176C4A90A93"}'
          description: >-
            Yanıt bağlamı biliniyorsa yanıtlanan mesajın kimliğini içeren JSON
            dizesi. Canlı, gönderilen ve geçmiş eşitleme mesajlarından alınır.
            Bağlamla yeniden içe aktarılana kadar eski kayıtlı satırlar dahil,
            yanıt bağlamı yoksa dahil edilmez.
        filename:
          type: string
          example: photo.jpg
          nullable: true
          description: Medya mesajlarının özgün dosya adı
        url:
          type: string
          example: https://media.example.com/file.jpg
          nullable: true
          description: Medya dosyası URL adresi
        file_length:
          type: integer
          example: 1024768
          nullable: true
          description: Medya mesajlarının bayt cinsinden dosya boyutu
        created_at:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
          description: Kaydın oluşturulma zaman damgası
        updated_at:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
          description: Kaydın son güncelleme zaman damgası
    Chat:
      type: object
      properties:
        jid:
          type: string
          example: 6289685028129@s.whatsapp.net
          description: Sohbet JID tanımlayıcısı
        name:
          type: string
          example: John Doe
          description: Sohbetin görünen adı
        last_message_time:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
          description: Son mesajın zaman damgası
        ephemeral_expiration:
          type: integer
          example: 0
          description: Geçici mesajların saniye cinsinden sona erme süresi (0 = devre dışı)
        created_at:
          type: string
          format: date-time
          example: '2024-01-10T08:00:00Z'
          description: Sohbetin oluşturulma zaman damgası
        updated_at:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
          description: Sohbetin son güncelleme zaman damgası
        archived:
          type: boolean
          example: false
          description: Sohbetin arşivlenmiş olup olmadığı
    ChatReaction:
      type: object
      properties:
        emoji:
          type: string
          example: 👍
          description: Tepkide kullanılan emoji
        sender_jid:
          type: string
          example: 628123456789@s.whatsapp.net
          description: Tepki veren kullanıcının JID değeri
        sender_display_name:
          type: string
          example: Saved Contact
          description: >-
            Bu yanıt oluşturulurken dinamik olarak çözümlenen, insan tarafından
            okunabilir gönderen etiketi; tepkiyle birlikte saklanmaz. Diğer
            gönderenler için sırasıyla kayıtlı kişinin tam adı, kayıtlı kişinin
            profil adı, işletme adı, JID kullanıcı bölümü ve ham JID tercih
            edilir. Etkin hesap için sırasıyla cihazın görünen adı (yoksa
            kayıtlı hesap profil adı), hesap JID kullanıcı bölümü, hesap JID
            değeri, gönderen JID kullanıcı bölümü ve ham gönderen JID değeri
            tercih edilir. Bu nedenle bir kişinin adının değiştirilmesi, geçmiş
            tepkiler için döndürülen etiketi değiştirebilir. `sender_jid` sabit
            gönderen tanımlayıcısı olarak kalır.
        is_from_me:
          type: boolean
          example: false
          description: Tepkinin mevcut kullanıcı tarafından verilip verilmediği
        timestamp:
          type: string
          format: date-time
          example: '2024-01-15T10:31:00Z'
          description: Tepkinin alınma zamanı
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

## Related topics

- [En son bülten (kanal) mesajlarını getir](https://gowa-docs.mintlify.site/tr/api-reference/newsletter/en-son-bülten-kanal-mesajlarını-getir.md)
- [Zamanlanmış bir gönderimi getir](https://gowa-docs.mintlify.site/tr/api-reference/send/zamanlanmış-bir-gönderimi-getir.md)
- [Sohbet listesini getir](https://gowa-docs.mintlify.site/tr/api-reference/chat/sohbet-listesini-getir.md)
- [Telefondan daha eski sohbet geçmişini iste](https://gowa-docs.mintlify.site/tr/api-reference/chat/telefondan-daha-eski-sohbet-geçmişini-iste.md)
- [Bir gruptaki katılımcıların listesini getir](https://gowa-docs.mintlify.site/tr/api-reference/group/bir-gruptaki-katılımcıların-listesini-getir.md)


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