Sohbet Geçmişi Uç Noktaları
Sohbetler API (/api/v1/conversations)
Ortak gelen kutunuzdaki tüm aktif WhatsApp sohbet başlıklarını ve sohbetlere ait detaylı mesaj geçmişini programatik olarak sorgulayabilirsiniz.
GEThttps://gelsinsatislar.com/api/v1/conversationsScope: conversations:read
1. Sohbetleri Listele
Aktif tüm sohbet başlıklarını listeler. Her sohbet kaydı, ilgili müşteri bilgisi, son mesaj zaman damgası ve okunmamış mesaj sayısını içerir.
curl -X GET "https://gelsinsatislar.com/api/v1/conversations?limit=10" \
-H "Authorization: Bearer gelsinsatislar_live_YOUR_API_KEY"{
"data": [
{
"id": "conv_991823",
"contact_id": "cnt_10294",
"contact_name": "Ahmet Yılmaz",
"contact_phone": "+905320000000",
"status": "open",
"unread_count": 0,
"last_message_at": "2026-08-08T22:10:00Z"
}
],
"error": null
}GEThttps://gelsinsatislar.com/api/v1/conversations/{id}/messagesScope: conversations:read
2. Sohbet Geçmişini Getir (Mesaj Listesi)
Belirtilen sohbetin iddeğerini URL'ye ekleyerek o sohbete ait tüm WhatsApp mesajlarını (gelen ve giden) kronolojik sırayla çekebilirsiniz. Sayfalama parametreleri desteklenmektedir.
curl -X GET "https://gelsinsatislar.com/api/v1/conversations/conv_991823/messages?limit=20" \
-H "Authorization: Bearer gelsinsatislar_live_YOUR_API_KEY"{
"data": [
{
"message_id": "msg_991824",
"direction": "inbound",
"from": "+905320000000",
"type": "text",
"text": "Sipariş durumum nedir?",
"created_at": "2026-08-08T22:09:00Z"
},
{
"message_id": "msg_991825",
"direction": "outbound",
"from": "+905300000000",
"type": "text",
"text": "Merhaba Ahmet Bey, kargonuz yola çıktı. Takip no: 987654321",
"created_at": "2026-08-08T22:11:00Z"
}
],
"error": null
}direction alanı mesajın yönünü belirtir:
inbound müşteri tarafından gelen mesajı, outbound ise sizin gönderdiğiniz mesajı temsil eder.