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

# Telefondan daha eski sohbet geçmişini iste

> Bir sohbetin daha eski mesajlarını gerektiğinde telefondan ister (WhatsApp Web’de yukarı kaydırdığınızda / "eski mesajları yükle" dediğinizde yapılan işlem). İstek, o sohbet için şu anda yerel olarak depolanan en eski mesajı temel alır; bu nedenle sohbetin en az bir depolanmış mesajı olmalıdır. Telefon, sohbet deposuna kaydedilen bir geçmiş eşitleme olayıyla eşzamansız olarak yanıt verir; bu uç nokta yalnızca isteğin gönderildiğini onaylar, eski mesajları doğrudan döndürmez.



## OpenAPI

````yaml /tr/openapi.yml post /chat/{chat_jid}/history
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}/history:
    post:
      tags:
        - chat
      summary: Telefondan daha eski sohbet geçmişini iste
      description: >-
        Bir sohbetin daha eski mesajlarını gerektiğinde telefondan ister
        (WhatsApp Web’de yukarı kaydırdığınızda / "eski mesajları yükle"
        dediğinizde yapılan işlem). İstek, o sohbet için şu anda yerel olarak
        depolanan en eski mesajı temel alır; bu nedenle sohbetin en az bir
        depolanmış mesajı olmalıdır. Telefon, sohbet deposuna kaydedilen bir
        geçmiş eşitleme olayıyla eşzamansız olarak yanıt verir; bu uç nokta
        yalnızca isteğin gönderildiğini onaylar, eski mesajları doğrudan
        döndürmez.
      operationId: requestChatHistory
      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
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                count:
                  type: integer
                  default: 50
                  minimum: 0
                  maximum: 500
                  example: 50
                  description: >-
                    Telefondan istenecek eski mesaj sayısı. Varsayılan 50
                    değerini kullanmak için belirtmeyin veya 0 gönderin.
      responses:
        '200':
          description: Tamam
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestChatHistoryResponse'
        '400':
          description: >-
            Geçersiz istek (ör. eksik chat_jid, aralık dışı count veya sohbette
            temel alınacak depolanmış mesaj bulunmaması)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '401':
          description: Yetkisiz
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorUnauthorized'
        '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:
    RequestChatHistoryResponse:
      type: object
      properties:
        status:
          type: integer
          example: 200
        code:
          type: string
          example: SUCCESS
        message:
          type: string
          example: History sync requested successfully
        results:
          type: object
          properties:
            status:
              type: string
              example: requested
            chat_jid:
              type: string
              example: 6289685028129@s.whatsapp.net
            requested_count:
              type: integer
              example: 50
            anchor_message_id:
              type: string
              example: 3EB0C767D82B0A0D1234
            anchor_timestamp:
              type: string
              format: date-time
              example: '2026-05-16T08:00:00Z'
    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
    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

- [Mesaj alma](https://gowa-docs.mintlify.site/tr/examples/receiving-messages.md)
- [Mesajı ilet](https://gowa-docs.mintlify.site/tr/api-reference/message/mesajı-ilet.md)
- [Gönderim Sınırları](https://gowa-docs.mintlify.site/tr/advanced/rate-limiting.md)
- [Medya İşleme](https://gowa-docs.mintlify.site/tr/examples/media-handling.md)
- [Sohbet listesini getir](https://gowa-docs.mintlify.site/tr/api-reference/chat/sohbet-listesini-getir.md)


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