Webhooks Integration Guide
OneManage Webhooks allow you to receive real-time HTTP POST notifications when specific events occur in your workspace. This is the best way to integrate OneManage with third-party services like Slack, Discord, Jira, or your own custom backend.
Supported Events
| Event | Trigger |
|---|---|
BUG_REPORT_CREATED |
Fired whenever a new bug report is submitted to any of your registered apps. |
CRITICAL_LOG |
Fired when a log with level ERROR or FATAL is ingested. |
Payload Schema
Webhooks are sent as JSON POST requests.
Bug Report Created
{
"id": "60d5ec...",
"appId": "60d5eb...",
"title": "App Crash on Startup",
"severity": "CRITICAL",
"status": "OPEN",
"createdAt": 1624623123000
}
Critical Log Ingested
{
"logId": "log_123...",
"level": "ERROR",
"message": "NullPointerException in UserService",
"event": "user_login_failed",
"timestamp": 1624623123000
}
Security & Verification
To ensure that a webhook request actually came from OneManage, every request includes an X-OneManage-Signature header. This signature is an HMAC-SHA256 hash of the raw request body, signed with your webhook's unique Secret.
Verifying the Signature (Node.js Example)
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const hmac = crypto.createHmac('sha256', secret);
const digest = hmac.update(payload).digest('hex');
return signature === digest;
}
// In your Express route:
app.post('/webhook', (req, res) => {
const signature = req.headers['x-onemanage-signature'];
const isValid = verifyWebhook(JSON.stringify(req.body), signature, 'YOUR_WEBHOOK_SECRET');
if (!isValid) return res.status(401).send('Invalid signature');
// Process the event...
res.status(200).send('OK');
});
Delivery & Retries
- Timeout: OneManage expects your server to respond within 10 seconds.
- Retries: If your server returns a non-2xx status code or times out, OneManage will retry the delivery up to 5 times with exponential backoff (1m, 5m, 15m, 1h, 1h).
- Ordering: Webhooks are delivered in the order they were generated, but delivery is not strictly guaranteed to be sequential across different webhooks.