Gelen Mesaj Gönderme
Mobil Uygulama Entegrasyon Kılavuzu
Gelen Mesaj Gönderme
Cihaz tarafından alınan bir SMS veya WhatsApp mesajını sunucudaki gelen kutusuna iletir. Bir otomatik yanıt kuralı eşleşirse sunucu bir yanıt kuyruğa alır ve yanıt metnini doğrudan aynı yanıt içinde döndürür; böylece uygulama ikinci bir yoklamaya gerek kalmadan yanıtı hemen gönderebilir.
İstek Gövdesi
| Alan | Tür | Açıklama | |
|---|---|---|---|
| from_phone | string | zorunlu | Gönderen telefon numarası (rakamlar ve + karakterine izin verilir). |
| message | string | zorunlu | Mesaj gövde metni. |
| channel | string | isteğe bağlı | sms veya whatsapp. Varsayılan sms. |
Örnek İstek
cURL
curl -X POST "https://api.rcszilla.com/?endpoint=submit_reply" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-DEVICE-TOKEN" \
-d '{
"from_phone": "+40712345678",
"channel": "sms",
"message": "YES please send me more info"
}'
Yanıt
{
"success": true,
"message": "Reply received",
"id": 209,
"reply": null,
"reply_queue_id": null
}
{
"success": true,
"message": "Reply received",
"id": 209,
"reply": "Thanks for your message! We will get back to you shortly.",
"reply_queue_id": 315
}
Yanıtta
reply null değilse uygulama, bu metni aynı kanaldan from_phone numarasına geri göndermeli ve ardından reply_queue_id ile mark_sent çağrısını yapmalıdır.Auto-reply Flow
- App receives inbound SMS/WhatsApp.
- App calls
submit_reply. - Server matches message against auto-reply rules.
- If matched �server queues the reply and returns
"reply"text inline. - App sends the reply text directly to the sender (no second poll needed).
- App calls
mark_sentwithreply_queue_idto confirm delivery.