Webhooks

Livepin integrations often involve inbound webhook-style callbacks to your service. The current collection includes webhook receivers for messaging and assistant-style automations.

Webhook endpoints in collection

  • POST /api/whatsapp-log/msg91-webhook
  • POST /api/whatsapp-log/alexa-webhook

Depending on your deployment model, these routes may be hosted in your Livepin backend or forwarded to your application.

Consuming webhooks

When receiving webhook traffic:

  1. Verify source and signature (if configured in your environment).
  2. Validate payload schema.
  3. Return 2xx quickly.
  4. Process business logic asynchronously.

Example webhook payload

{
  "event": "message.received",
  "timestamp": "2026-04-29T10:30:00.000Z",
  "source": "msg91",
  "payload": {
    "from": "+919999999999",
    "message": "Where is vehicle DUMMY-VEHICLE-001?"
  }
}

Minimal Node.js handler

Express-style receiver

app.post('/webhooks/livepin', async (req, res) => {
  // 1) Verify signature/token if present.
  // 2) Validate schema and deduplicate by event id.
  // 3) ACK fast.
  res.status(200).json({ received: true })

  // 4) Process in background queue.
  await jobQueue.add('livepin-webhook', req.body)
})

Reliability checklist

  • Make handlers idempotent using event IDs.
  • Enforce short timeout and fast acknowledgment.
  • Implement retries and dead-letter handling in your queue.
  • Persist payload + processing status for auditability.

Was this page helpful?