Webhooks

In this guide, we will look at how to create and consume a webhook so that you can integrate your app with SentryPeer. With webhooks, your app can know when an API query finds a match on the Phone Numbers or IP Addresses resources.

Create a webhook

To create a new webhook, you need to have a URL in your app that SentryPeer can POST to. You can configure a new webhook from the SentryPeer dashboard under Integrations. Give your webhook a name, set the payload subject and message, and add your URL.

Now, whenever a RESTful API query finds a match (200 OK), a webhook is fired off by the SentryPeer platform. In the next section, we'll look at how to consume webhooks.

Consuming webhooks

An incoming webhook request will contain a JSON payload with the following properties:

Example webhook payload

{
  "type": "sentrypeer_webhook",
  "subject": "Testing from SentryPeer",
  "number_or_ip_address": "Testing SentryPeer Webhook Integration",
  "message": "A match has been found!"
}

Event types

At the moment, there is only one event type: sentrypeer_webhook. In the future, we will add more event types to the SentryPeer platform. Please contact us if you have any suggestions for new event types.

  • Name
    sentrypeer_webhook
    Type
    Description

    A standard SentryPeer webhook payload.

Example payload

{
  "type": "sentrypeer_webhook",
  "subject": "Testing from SentryPeer",
  "number_or_ip_address": "Testing SentryPeer Webhook Integration",
  "message": "A match has been found!"
}