Ana içeriğe geç

Client API'ye Genel Bakış

Client API, harici sistemlerin AI Thinks chatbot platformuna mesaj göndermesini sağlayan HTTP API’dir.

Mesajlar bu serviste işlenmez; doğrulama sonrası platformun mesaj işleme katmanına iletilir.

Ne işe yarar?

SorumlulukAçıklama
Mevcut sohbete mesajSon 24 saat içindeki aktif konuşmaya tip + içerik gönderir
Push / outbound template24 saat dolunca veya outbound ihtiyaçta template ile telefona mesaj tetikler
YetkilendirmeŞirkete bağlı access token ile erişim

Konuşma penceresi

Son 24 saat içinde aktif sohbet
→ POST /message/send

24 saat doldu / outbound ulaşım
→ POST /push-message

Entegrasyon akışı

1. Access token al (admin panel / Access Tokenlar)
2. Header: x-access-token
3. POST /message/send → mevcut chat’e mesaj
veya
POST /push-message → template ile outbound mesaj

Base URL

const BASE_URL = 'https://client-api.chatbot.aithinks.net';

Canlı servis: https://client-api.chatbot.aithinks.net/

Sonraki adımlar

  1. Access Token Oluşturma
  2. Kimlik doğrulama
  3. Mesaj göndermePOST /message/send
  4. Push mesajPOST /push-message
  5. Mesaj tipleri
  6. Hata formatı