How to setup webhooks

Webhooks allow you to push Hyperping events to third-parties you’re already using whether it’s in your in-house system or an application that’s not yet integrated with Hyperping.

You can enter your webhook endpoint at the project level.



Webhook Events

When an outage arises, the webhook URL receives a POST request with a `check.down` in its payload.

It also contains the list of the double checks in `pings`. The ping having the key `original` set to `true` is the region that detected the outage.

{
    event: "check.down",
    check: {
        url: "https://js.stripe.com/v3/",
        status: 502,
        down: true,
        date: 1556506024291,
        downtime: 1
    },
    pings: [
        {
            original: true,
            location: "london",
            status: 502,
            statusMessage: "Bad Gateway"
        },
        {
            original: false,
            location: "paris",
            status: 502,
            statusMessage: "Bad Gateway"
        },
        {
            original: false,
            location: "frankfurt",
            status: 502,
            statusMessage: "Bad Gateway"
        }
    ]
}

When an outage ends, a `check.up` event is sent to the webhook URL.

{
    event: "check.up",
    check: {
        url: "https://js.stripe.com/v3/",
        status: 200,
        down: false,
        date: 1556505843864,
        downtime: 2
    }
}

Before any outage eventually happens, you can already test both events using the test buttons below the webhook url field.