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
}'| Field | Type | Description |
|---|---|---|
deviceUidrequired | string | UID of the device to configure. |
personalWebhookUrl | string | HTTPS URL that receives 1:1 inbound messages. |
groupWebhookUrl | string | HTTPS URL that receives group inbound messages. |
isActive | boolean | Toggle 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"| Field | Type | Description |
|---|---|---|
deviceUid | string | Filter by device. |
status | string | SUCCESS or FAILED. |
page | integer | 1-based page number. |
limit | integer | Page size. |
Status events