RCSZilla Versi贸n 1.0

Obtener mensajes pendientes

Gu铆a de integraci贸n de la aplicaci贸n m贸vil

Obtener mensajes pendientes

GET /?endpoint=pending_messages

Devuelve un lote de mensajes de la cola saliente listos para enviar. La API reclama at贸micamente los mensajes devueltos (estado -> processing).

Par谩metros de consulta

Campo Tipo Descripci贸n
limit integer opcional M谩ximo de mensajes a devolver (1-100, predeterminado 50).
channel string opcional Filtrar por canal: sms o whatsapp. Omitir para todos.
*
Los mensajes asignados a este dispositivo se devuelven primero, seguidos de los mensajes no asignados.

Ejemplo de solicitud

cURL
curl "https://api.rcszilla.com/?endpoint=pending_messages&limit=10&channel=sms" \
  -H "Authorization: Bearer YOUR-DEVICE-TOKEN"

Respuesta

JSON200 OK
{
  "success": true,
  "count": 2,
  "messages": [
    {
      "id": 101,
      "user_id": 1,
      "contact_id": 55,
      "campaign_id": null,
      "device_id": 7,
      "sim_slot": 0,
      "channel": "sms",
      "phone": "+40712345678",
      "message": "Hello from SMS Manager!",
      "priority": 1,
      "scheduled_at": null,
      "created_at": "2026-04-29 10:00:00"
    },
    {
      "id": 102,
      "user_id": 1,
      "contact_id": 56,
      "campaign_id": 3,
      "device_id": null,
      "sim_slot": 1,
      "channel": "sms",
      "phone": "+40799999999",
      "message": "Campaign message body here.",
      "priority": 1,
      "scheduled_at": null,
      "created_at": "2026-04-29 10:00:05"
    }
  ]
}

Message Fields

CampoTipoDescripci贸n
idintegerUnique queue item ID. Pass to all mark_* endpoints.
channelstringsms or whatsapp
phonestringRecipient phone number.
messagestringMessage body text.
sim_slotinteger0 = SIM 1, 1 = SIM 2, null = any.
device_idinteger|nullDevice this message is assigned to (null = any device).
campaign_idinteger|nullCampaign this message belongs to, or null for direct messages.
priorityintegerLower number = higher priority. Sorted ascending.
scheduled_atdatetime|nullOnly returned when scheduled_at 鈮?NOW().
*
Prefer using poll instead 鈥?it returns pending messages together with commands and config in a single request, reducing round trips.