Docs Developers Status ForumSpark Hub
Connect · Webhooks

Webhooks

Subscribe to events on a board and receive real-time HMAC-signed HTTP POST payloads when things happen.

How webhooks work

  1. Create a webhook subscription via the API specifying the event and your endpoint URL.
  2. When the event fires, ForumSpark sends a POST request to your URL with a JSON payload.
  3. Each request includes a Signature header: an HMAC-SHA256 hash of the payload signed with your webhook secret.
  4. 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

EventDescription
users/createA new user registered
users/updateA user profile was updated
users/deleteA user was deleted
users/banA user was banned (includes ban reason, duration, permanent flag)
groups/createA user group was created
groups/updateA user group was updated
groups/deleteA user group was deleted
topics/createA new topic was posted
topics/updateA topic was edited
topics/deleteA topic was deleted
topics/lockA topic was locked (closed)
topics/unlockA topic was unlocked (reopened)
topics/pinA topic was pinned
topics/unpinA topic was unpinned
replies/createA reply was posted
replies/updateA reply was edited
replies/deleteA reply was deleted
reactions/addA reaction was added to a reply
reactions/removeA reaction was removed from a reply
reports/createContent was reported by a user
credits/purchaseA shop item was purchased with credits
credits/transactionA credit transaction was recorded
directory/link.submittedA link was submitted to the link directory
directory/link.approvedA link directory submission was approved

Topic reference

Generated from the event registry
TopicFires when
credits/purchaseCredits Purchase
credits/transactionCredits Transaction
directory/link.approvedDirectory Link.approved
directory/link.submittedDirectory Link.submitted
groups/createGroups Create
groups/deleteGroups Delete
groups/updateGroups Update
reactions/addReactions Add
reactions/removeReactions Remove
replies/createReplies Create
replies/deleteReplies Delete
replies/updateReplies Update
reports/createReports Create
topics/createTopics Create
topics/deleteTopics Delete
topics/lockTopics Lock
topics/pinTopics Pin
topics/unlockTopics Unlock
topics/unpinTopics Unpin
topics/updateTopics Update
users/banUsers Ban
users/createUsers Create
users/deleteUsers Delete
users/updateUsers Update