Internal Webhooks

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

This feature is being rebuilt to support more notification types. Please reach out to support@hostedhooks.com if you are interested in it.

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 support@hostedhooks.com 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

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.

{
  "data": {
    "subscription": {
      "id": "166213ab-a480-4ab3-9868-7ac3359ea63a",
      "status": "active",
      "updated_at": "2021-03-29T10:03:09.717-04:00",
      "created_at": "2021-03-29T10:03:09.717-04:00",
      "organization": {
        "id": "166213ab-a480-4ab3-9868-7ac3359ea63a",
        "name": "ABC Company",
        "updated_at": "2021-03-29T10:03:09.717-04:00",
        "created_at": "2021-03-29T10:03:09.717-04:00",
        "email_address": "support@abccompany.com"
      }
    }
  },
  "version" : "1.0",
  "event_type": "subscription.created",
  "event_id": "12323124151",
  "created" : "2021-08-12T03:49:44.837Z"
}

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 support@hostedhooks.com

Last updated