Invia messaggio in arrivo
Guida all'integrazione dell'app mobile
Invia messaggio in arrivo
Invia un SMS in arrivo o messaggio WhatsApp ricevuto dal dispositivo nella posta in arrivo del server.
Corpo della richiesta
| Campo | Tipo | Descrizione | |
|---|---|---|---|
| from_phone | string | obbligatorio | Numero di telefono del mittente (cifre e + consentiti). |
| message | string | obbligatorio | Testo del messaggio. |
| channel | string | opzionale | sms o whatsapp. Predefinito sms. |
Esempio di richiesta
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"
}'
Risposta
{
"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
}
Se
reply non รจ null nella risposta, l'app deve inviare quel testo a from_phone sullo stesso canale e poi chiamare mark_sent con reply_queue_id.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.