Skip to main content
Webhooks
Oliver Zdravkovski avatar
Written by Oliver Zdravkovski
Updated over a week ago

In this Help doc


Create a New Webhook Endpoint

  1. Click Settings

  2. Expand your Organization

  3. Click Webhooks

  4. Click New Webhook Endpoint

  5. Enter the name of the webhook

  6. Enter the webhook URL

  7. Select the desired Event Types:

    • graph.created

    • graph.deleted

    • graph.updated (this refers to graph settings, not values)

    • knowledge_item.created

    • knowledge_item.deleted

    • knowledge_item.updated

    • member.created

    • member.deleted

    • member.updated

    • position.created

    • position.deleted

    • position.updated

    • team.created

    • team.deleted

    • team.updated

  8. Click Create Webhook Endpoint

  9. Your Webhook Endpoint is displayed

  10. Normally, after creating the Webhook endpoint, this area will be empty. Once you start creating, updating or deleting data relevant to the event types you've chosen, the events will appear here.


Edit a Webhook Endpoint

  1. Click Settings

  2. Expand your Organization

  3. Click Webhooks

  4. Click the Webhook Endpoint

  5. Click Edit Endpoint

  6. Update the desired data

  7. Click Update Webhook Endpoint


Delete a Webhook Endpoint

  1. Click Settings

  2. Expand your Organization

  3. Click Webhooks

  4. Click the Webhook Endpoint

  5. Click Edit Endpoint

  6. Click Delete Endpoint


Get the Signing Secret

  1. Click Settings

  2. Expand your Organization

  3. Click Webhooks

  4. Click the Webhook Endpoint

  5. Click Reveal


Validate a Webhook Request

As a necessary security practice, you should validate the webhook request to ensure a webhook is coming from MetaPulse. To do that, you will need to generate a signature and compare it to the MetaPulse-Signature request header. Here's how:

  1. Get the Signing Secret from MetaPulse after configuring the webhook endpoint there.

  2. Combine the MetaPulse-Request-Timestamp request header with the request body joined by a period (.). It will look like this: 1721173157.{id: "abc123", ...}

  3. Use OpenSSL HMAC to generate a SHA256 hexdigest using the Signing Secret and the combined timestamp and body.

  4. Compare the result with the MetaPulse-Signature header.

Example Ruby code:

signing_secret = "..." 
timestamp = request.headers["MetaPulse-Request-Timestamp"]
body = request.body.read
signature = OpenSSL::HMAC.hexdigest("SHA256", signing_secret, "#{timestamp}.#{body}")
if signature == request.headers["MetaPulse-Signature"]
# Valid request
else
# Invalid request
end

Did this answer your question?