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:

    • data_point.created

    • data_point.deleted

    • data_point.updated

    • event.created

    • event.deleted

    • event.updated

    • 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

    • objective.created

    • objective.deleted

    • objective.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


Check Status of Webhook Events

  1. Click Settings

  2. Expand your Organization

  3. Click Webhooks

  4. Click the Webhook Endpoint

  5. Click the desired Webhook Event

  6. All data regarding the event will be displayed, such as who triggered it and when, the data all attempts related to it.

  7. To get more data on any of the attempts, click the drop-down arrow on the desired attempt.

  8. All related info will appear.

  9. Obviously, this is an example is a successful event. If there are failed attempts, it will keep trying to resend the event in the next 3 days. The errors will also appear under Response Status Code and Response Body.


Filter Webhook Events

  1. Click Settings

  2. Expand your Organization

  3. Click Webhooks

  4. Click the Webhook Endpoint

  5. By default, it will list All events. To see the Sent or Failed ones, click on the desired filter.


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?