Page:
Heartbeat-Protocol
Clone
Heartbeat Protocol
Endpoint
POST {hq_base_url}/api/index.php/v1/mokosuitehq/heartbeat
Authentication
- RSA Signature:
X-MokoSuite-Signatureheader (base64-encoded) - Timestamp:
X-MokoSuite-Timestampheader (Unix timestamp) - Per-site Token:
tokenfield in JSON body
Signature Verification
Message: {domain}|{timestamp}|{token}
Algorithm: OPENSSL_ALGO_SHA256
Max age: 300 seconds (replay protection)
Response
{"status": "ok", "site_id": 1, "received": "2026-06-21 12:00:00"}
Error Codes
| Code | Meaning |
|---|---|
| 401 | Missing token or domain |
| 403 | Missing/invalid/expired signature |
| 500 | Server error |
| 503 | RSA verification not configured |
Auto-Registration
On first heartbeat from an unknown domain, HQ auto-registers the site. Token rotation is allowed when RSA signature is valid (reinstall scenario).