Resumen de api de webhook: integración y automatización

Webhooks

Use webhooks to receive message events immediately in your system.

Two webhook types are available:

  1. Delivery status webhook for outgoing messages.
  2. Incoming message webhook for SMS and other supported channels.

1. Delivery status webhook

Configure this webhook in device settings to receive status updates without polling the API.

{
  "sms_id": int,
  "status_id": int,
  "status_message": string,
  "sendto": string,
  "senttime": datetime,
  "channel_id": int,
  "device_id": int
}
  • 1 - SMS pendientes
  • 2 - SMS tomado por teléfono
  • 3 - En cola para el envío. Certainly, it would have been more logical to place the status "queued for sending" before "SMS taken by phone," but for backward compatibility, the statuses are in the following order: 1, 3, 2."
  • 5 - SMS entrante
  • 6 - SMS enviado por teléfono
  • 7 - SMS ha sido entregado
  • 8 - SMS NO se entregó
  • 9 - SMS no enviado en absoluto - Fallo genérico. (Lee qué hacer con este error aqui)
  • Otros, errores menos comunes:
  • 10 - SMS no enviado - No Service
  • 11 - SMS no enviado - Null PDU
  • 12 - SMS no enviado - Radio Off
  • 100, 101 - SMS no enviado - NOT ALLOWED. (Los permisos para enviar SMS en la solicitud no fueron concedidos)

2. Incoming message webhook

Configure this webhook to forward incoming messages to your CRM, helpdesk or backend.

{
  "address": string,
  "date": datetime,
  "date_sent": datetime,
  "body": string,
  "internal_id": int,
  "channel_id": int,
  "sms_id": int,
  "device_id": int,
  "device_name": string
}
Webhook availability depends on your subscription plan.