Internal Webhooks
Learn how to receive webhooks from HostedHooks whenever a new subscriber signs up for your webhooks

Introduction

As a provider you'll want to receive updates when your subscribers take certain actions with your webhooks. These are things like "user subscribes to your webhooks" or "user creates a new endpoint". When these actions occur, you can get notified by becoming a subscriber of the HostedHooks Provider webhooks. We will send a webhook message to your endpoint to help generate mappings and maintain state.
Let me walk you through how to do that.

Getting Started

Step 1: Create an account

Before you can subscribe to the HostedHooks internal webhooks, you will need to create an account. You can do that by heading over to https://www.hostedhooks.com/sign_up.

Step 2: Get Invited

Once you have an account you will need to be invited to our internal webhooks. Reach out to [email protected] and we will get you setup.
If you don't already have an account then you will receive an email inviting you to set one up.

Step 3: Setup your endpoints

Once you accept the invitation and setup your account ( if not already created ) you will see a section where your subscriptions are listed. The subscription will be called "HostedHooks Providers".
Click "View" on your subscription to start creating your endpoints. To do so you will need to add your endpoint URL, a description and leave the status on active. Once your endpoint is created, make sure you pick the events that you want that endpoint to receive.

Step 4: Ingest webhook payload

Supported Events

Event Name
Description
subscriber.created
Whenever a subscriber is created you will receive a webhook (payload below) with all of the relevant data to maintain a mapping on your system.
We currently support the subscriber.created (let us know if you need a different event) webhook event which will get triggered whenever you have a new subscriber signs up for your webhooks. This will allow you to keep track of the subscriber ID so you can trigger your webhook messages to the correct subscriber.
This is what the subscriber.created webhook payload will look like.
1
{
2
"data": {
3
"subscription": {
4
"id": "166213ab-a480-4ab3-9868-7ac3359ea63a",
5
"status": "active",
6
"updated_at": "2021-03-29T10:03:09.717-04:00",
7
"created_at": "2021-03-29T10:03:09.717-04:00",
8
"organization": {
9
"id": "166213ab-a480-4ab3-9868-7ac3359ea63a",
10
"name": "ABC Company",
11
"updated_at": "2021-03-29T10:03:09.717-04:00",
12
"created_at": "2021-03-29T10:03:09.717-04:00",
13
"email_address": "[email protected]"
14
}
15
}
16
},
17
"version" : "1.0",
18
"event_type": "subscription.created",
19
"event_id": "12323124151",
20
"created" : "2021-08-12T03:49:44.837Z"
21
}
Copied!
Once you've subscribed to this payload, you will be able to trigger sample payloads from your endpoint page which will send mock webhook attempts to your endpoint URL.
The webhook attempt will be sent as a POST request and the response must return a 200 or it will be assumed they have failed and the webhook attempts will be retried until a 200 response is received.
If you are interested in verifying the signature on your webhooks, you can follow this guide here on how to use the HTTP_HOSTEDHOOKS_SIGNATURE.

Step 5: Go live

Once you are comfortable with how your webhooks are being ingested, you are all set and are ready for production. There is nothing left for you to do except to start adding subscribers to your webhooks.

Conclusion

If there are any other events that you want to receive, please let us know and we will work to add them. And as always, we are here to help with your integration. If you have any questions please reach out to [email protected]
Last modified 2mo ago