Submit Incoming Message
Mobile App Integration Guide
Submit Incoming Message
Submits an incoming SMS or WhatsApp message received by the device into the server inbox. If an auto-reply rule matches, the server queues a reply and returns the reply text inline so the app can send it immediately without a second poll.
Request Body
| Field | Type | Description | |
|---|---|---|---|
| from_phone | string | required | Sender phone number (digits and + allowed). |
| message | string | required | Message body text. |
| channel | string | optional | sms or whatsapp. Defaults to sms. |
Example Request
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"
}'
Response
{
"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
}
If
reply is non-null in the response, the app should send that text back to from_phone on the same channel and then call mark_sent with 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.