Msgeradocs

Webhooks

Receive inbound WhatsApp messages from Msgera at your own endpoint.

Msgera POSTs a JSON payload to your endpoint every time an inbound WhatsApp message arrives at a connected device. You configure two independent URLs per device — one for 1:1 chats (personal) and one for group chats (group). Configure them via the dashboard or with PUT /v1/developer/webhooks.

Configure your URLs

curl -X PUT https://api.msgera.com/v1/developer/webhooks \
  -H "X-API-Key: $MSGERA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "deviceUid": "dev_4f8c2a1e",
    "personalWebhookUrl": "https://app.example.com/wa/incoming",
    "groupWebhookUrl":    "https://app.example.com/wa/groups",
    "isActive": true
  }'
FieldTypeDescription
deviceUidrequiredstringUID of the device to configure.
personalWebhookUrlstringHTTPS URL that receives 1:1 inbound messages.
groupWebhookUrlstringHTTPS URL that receives group inbound messages.
isActivebooleanToggle delivery on/off without losing the URLs.

Payload

Msgera POSTs the normalized inbound-message payload as the raw request body with Content-Type: application/json. The full field reference lives on Webhook events.

Retries

Msgera expects a 2xx response within 10 seconds. Non-2xx responses (or timeouts) are retried up to 3 times with exponential backoff starting at 1 second. Both successful and failed attempts are recorded — inspect them via GET /v1/developer/webhooks/history or in Settings → Webhooks.

Inspect delivery history

curl "https://api.msgera.com/v1/developer/webhooks/history?deviceUid=dev_4f8c2a1e&status=FAILED" \
  -H "X-API-Key: $MSGERA_KEY"
FieldTypeDescription
deviceUidstringFilter by device.
statusstringSUCCESS or FAILED.
pageinteger1-based page number.
limitintegerPage size.

Status events

Delivery / read / failed updates for outbound messages aren't delivered to webhook URLs — they stream through the dashboard's realtime socket. Webhooks today only carry inbound events.