Connect · Webhooks
Webhooks
Subscribe to events on a board and receive real-time HMAC-signed HTTP POST payloads when things happen.
How webhooks work
- Create a webhook subscription via the API specifying the event and your endpoint URL.
- When the event fires, ForumSpark sends a
POSTrequest to your URL with a JSON payload. - Each request includes a
Signatureheader: an HMAC-SHA256 hash of the payload signed with your webhook secret. - Verify the signature to ensure the request is authentic.
Verifying signatures
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_SIGNATURE'] ?? '';
$secret = 'your_webhook_secret';
$expected = hash_hmac('sha256', $payload, $secret);
if (! hash_equals($expected, $signature)) {
http_response_code(403);
exit('Invalid signature');
}
Available events
| Event | Description |
|---|---|
| users/create | A new user registered |
| users/update | A user profile was updated |
| users/delete | A user was deleted |
| users/ban | A user was banned (includes ban reason, duration, permanent flag) |
| groups/create | A user group was created |
| groups/update | A user group was updated |
| groups/delete | A user group was deleted |
| topics/create | A new topic was posted |
| topics/update | A topic was edited |
| topics/delete | A topic was deleted |
| topics/lock | A topic was locked (closed) |
| topics/unlock | A topic was unlocked (reopened) |
| topics/pin | A topic was pinned |
| topics/unpin | A topic was unpinned |
| replies/create | A reply was posted |
| replies/update | A reply was edited |
| replies/delete | A reply was deleted |
| reactions/add | A reaction was added to a reply |
| reactions/remove | A reaction was removed from a reply |
| reports/create | Content was reported by a user |
| credits/purchase | A shop item was purchased with credits |
| credits/transaction | A credit transaction was recorded |
| directory/link.submitted | A link was submitted to the link directory |
| directory/link.approved | A link directory submission was approved |
Topic reference
Generated from the event registry| Topic | Fires when |
|---|---|
| credits/purchase | Credits Purchase |
| credits/transaction | Credits Transaction |
| directory/link.approved | Directory Link.approved |
| directory/link.submitted | Directory Link.submitted |
| groups/create | Groups Create |
| groups/delete | Groups Delete |
| groups/update | Groups Update |
| reactions/add | Reactions Add |
| reactions/remove | Reactions Remove |
| replies/create | Replies Create |
| replies/delete | Replies Delete |
| replies/update | Replies Update |
| reports/create | Reports Create |
| topics/create | Topics Create |
| topics/delete | Topics Delete |
| topics/lock | Topics Lock |
| topics/pin | Topics Pin |
| topics/unlock | Topics Unlock |
| topics/unpin | Topics Unpin |
| topics/update | Topics Update |
| users/ban | Users Ban |
| users/create | Users Create |
| users/delete | Users Delete |
| users/update | Users Update |