Heartbeat
Mobile App Integration Guide
Heartbeat
Lightweight device keep-alive and config/command sync. Deprecated in favor of poll, which does everything in one round trip. Kept for backward compatibility.
Deprecated. Use
poll instead. heartbeat is kept for backward compatibility only and may be removed in a future version.
Request Body (all optional)
| Field | Type | Description |
|---|---|---|
| service_active | boolean | true if the background service is running. |
| sms_count | integer | Total SMS messages sent since last reset. |
| fail_count | integer | Total failed messages since last reset. |
| whatsapp_enabled | boolean | true if WhatsApp is connected on the device. |
| is_default_sms | boolean | true if this app is the default SMS handler. |
| fcm_token | string | Updated FCM token (send only when it changes). |
Example Request
cURL
curl -X POST "https://api.rcszilla.com/?endpoint=heartbeat" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR-DEVICE-TOKEN" \
-d '{"service_active": true, "sms_count": 10}'
Response
JSON200 OK
{
"success": true,
"message": "ok",
"config": {},
"commands": []
}