Enviar mensaje entrante
GuÃa de integración de la aplicación móvil
Enviar mensaje entrante
EnvÃa un SMS entrante o mensaje de WhatsApp recibido por el dispositivo a la bandeja de entrada del servidor.
Cuerpo de la solicitud
| Campo | Tipo | Descripción | |
|---|---|---|---|
| from_phone | string | obligatorio | Número de teléfono del remitente (dÃgitos y + permitidos). |
| message | string | obligatorio | Texto del mensaje. |
| channel | string | opcional | sms o whatsapp. Predeterminado sms. |
Ejemplo de solicitud
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"
}'
Respuesta
{
"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
}
Si
reply no es null en la respuesta, la app debe enviar ese texto a from_phone en el mismo canal y luego llamar a 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.