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?
| Sorumluluk | Açıklama |
|---|---|
| Mevcut sohbete mesaj | Son 24 saat içindeki aktif konuşmaya tip + içerik gönderir |
| Push / outbound template | 24 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
- Access Token Oluşturma
- Kimlik doğrulama
- Mesaj gönderme —
POST /message/send - Push mesaj —
POST /push-message - Mesaj tipleri
- Hata formatı