Overview
Webhooks let your server receive HTTP POST callbacks when events occur in SmartlyQ — like a job completing or a social post being published.
Setting up webhooks
- Go to the Developer Dashboard
- Navigate to the Webhooks tab
- Add an endpoint URL (must be HTTPS)
- Select the events you want to receive
All webhook payloads are JSON:
{
"event": "job.completed",
"timestamp": "2026-03-02T14:30:00Z",
"data": {
"job_id": "job_abc123",
"type": "article_generation",
"status": "completed",
"result": { ... }
}
}
Verifying signatures
Every webhook includes an X-Signature header containing an HMAC-SHA256 signature. Verify it using your webhook secret (available in the dashboard):
const crypto = require("crypto");
function verifySignature(payload, signature, secret) {
const expected = crypto
.createHmac("sha256", secret)
.update(payload)
.digest("hex");
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}
Always verify the signature before processing a webhook. Unverified payloads may be spoofed.
Retry policy
If your endpoint returns a non-2xx status code, SmartlyQ retries delivery up to 5 times with exponential backoff (30s, 60s, 120s, 240s, 480s).
Available events
| Event | Trigger |
|---|
job.completed | An async job finished successfully |
job.failed | An async job failed |
social.posted | A social media post was published |
social.failed | A social media post failed to publish |
chatbot.message | A chatbot received a visitor message |
wallet.low | Wallet balance dropped below threshold |