You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/index.mdx
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,8 @@ export const sections = [
14
14
15
15
# API Documentation
16
16
17
-
Use the SentryPeer API to query Phone Numbers, IP Addresses, submit your own Honeypot Events, and more. {{ className: 'lead' }}
17
+
Use the SentryPeer API to query Phone Numbers and IP Addresses collected from SentryPeer honeypots. You can even submit your own Honeypot Events, and more.
18
+
Learn more [about SentryPeer](https://sentrypeer.com/about). {{ className: 'lead' }}
Copy file name to clipboardExpand all lines: src/pages/webhooks.mdx
+19-78Lines changed: 19 additions & 78 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,31 +3,27 @@ export const description =
3
3
4
4
# Webhooks
5
5
6
-
In this guide, we will look at how to register and consume webhooks to integrate your app with SentryPeer. With webhooks, your app can know when something happens in SentryPeer, such as someone sending a message or adding a contact. {{ className: 'lead' }}
6
+
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](/phone-numbers) or [IP Addresses](/ip-addresses) resources. {{ className: 'lead' }}
7
7
8
-
## Registering webhooks
8
+
## Create a webhook
9
9
10
-
To register a new webhook, you need to have a URL in your app that SentryPeer can call. You can configure a new webhook from the SentryPeer dashboard under [API settings](#). Give your webhook a name, pick the [events](#event-types) you want to listen for, and add your URL.
10
+
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](https://sentrypeer.com/integrations). Give your webhook a name, set the payload subject and message, and add your URL.
11
11
12
-
Now, whenever something of interest happens in your app, a webhook is fired off by SentryPeer. In the next section, we'll look at how to consume webhooks.
12
+
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.
13
13
14
14
## Consuming webhooks
15
15
16
-
When your app receives a webhook request from SentryPeer, check the `type` attribute to see what event caused it. The first part of the event type will tell you the payload type, e.g., a conversation, message, etc.
16
+
An incoming webhook request will contain a JSON payload with the following properties:
In the example above, a conversation was `updated`, and the payload type is a `conversation`.
30
-
31
27
<divclassName="not-prose">
32
28
<Button
33
29
href="#event-types"
@@ -41,88 +37,32 @@ In the example above, a conversation was `updated`, and the payload type is a `c
41
37
42
38
## Event types
43
39
40
+
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](https://sentrypeer.com/contact) if you have any suggestions for new event types.
@@ -170,3 +110,4 @@ if (hash_equals($hash, $signature)) {
170
110
</CodeGroup>
171
111
172
112
If your generated signature matches the `x-protocol-signature` header, you can be sure that the request was truly coming from SentryPeer. It's essential to keep your secret webhook key safe — otherwise, you can no longer be sure that a given webhook was sent by SentryPeer. Don't commit your secret webhook key to GitHub!
0 commit comments