Webhook Event: device.status
Device LifecycleJSON payload schema dispatched when the connection state of a WhatsApp device changes (Online, Offline, Hibernated, Logged Out, or Cooldown).
Operational Health Monitoring
Listen to this event to trigger instant alerts (via Slack, Telegram, or SMS) when a WhatsApp business line drops offline, allowing immediate troubleshooting before customer SLA is breached.
HTTP Endpoint
Authentication
| Header Key | Value | Required |
|---|---|---|
| Content-Type | application/json | Required |
| X-Wahide-Secret | whsec_live_... | Required |
Request Parameters
The request body must be formatted as JSON with the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
event | string | Required | Event identifier. Value is always 'device.status'. example: device.status |
device_id | string | Required | Unique WhatsApp device slot ID in Wahide. example: 01JPLAN0000000000000000001 |
timestamp | integer | Required | Unix epoch timestamp in seconds when the state transition occurred. example: 1725845100 |
data | object | Required | Container object holding device health and connection status. |
data.device_name | string | Required | Descriptive label assigned to this device in the dashboard. example: Customer Service CS-1 |
data.phone | string | Required | WhatsApp phone number associated with the device session. example: 6281234567890 |
data.status | string | Required | New connection state: 'ONLINE', 'OFFLINE', 'HIBERNATED', 'LOGGED_OUT', or 'COOLDOWN'. example: OFFLINE |
data.reason | string | Required | Detailed operational reason for the status change. example: Device was logged out from WhatsApp mobile application. |
data.heat_score | integer | Optional | Real-time anti-ban heat score (0 to 100). Scores above 80 trigger automated safety throttling. example: 15 |
Code Examples
curl -X POST https://api.your-business.com/webhook \
-H "Content-Type: application/json" \
-H "X-Wahide-Secret: whsec_live_9f8e7d6c5b4a3210fedcba9876543210" \
-d '{
"event": "device.status",
"device_id": "01JPLAN0000000000000000001",
"timestamp": 1725845100,
"data": {
"device_name": "Customer Service CS-1",
"phone": "6281234567890",
"status": "OFFLINE",
"reason": "Device was logged out from WhatsApp mobile application.",
"heat_score": 15
}
}'Response Formats
Acknowledgment response confirming receipt of device status event.