Submit Incoming Message

Mobile App Integration Guide

Submit Incoming Message

POST /?endpoint=submit_reply

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

FieldTypeDescription
from_phonestring required Sender phone number (digits and + allowed).
messagestring required Message body text.
channelstring 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

  1. App receives inbound SMS/WhatsApp.
  2. App calls submit_reply.
  3. Server matches message against auto-reply rules.
  4. If matched �server queues the reply and returns "reply" text inline.
  5. App sends the reply text directly to the sender (no second poll needed).
  6. App calls mark_sent with reply_queue_id to confirm delivery.