In addition to the [APIs](https://developer.leap.energy/reference/) that Leap offers, you can also subscribe to webhooks to be proactively informed about changes to your Leap portfolio. This guide aims to quickly get you up and running.

### Dispatch Webhook Events

Webhook events for dispatch notifications have been supported for multiple years and are currently setup independently of this general webhook platform. See the [Dispatch Webhook Events](https://developer.leap.energy/docs/webhook-push-notifications-v2) guide for setting up and receiving dispatch webhooks.

## Step 1: Expose an endpoint on your server

Webhooks are HTTP callbacks sent to an endpoint on your server.

To receive webhook events, you need a server that has the following:

- An endpoint that can receive a JSON payload.
- An open TCP port for HTTPS traffic (must be 443, 8443, or 8843) with TLSv1.2 or TLSv1.3.

### Tip: use webhook.site for testing

If you're not ready to expose an endpoint on your server yet, you can go to [https://webhook.site](https://webhook.site/) to create a webhook subscription URL, and use that when creating a webhook subscription in Leap's platform.

## Step 2: Set your webhook URL & subscribe to events

There are two ways in which you can configure webhooks:

- Partner Portal:
  - Staging: [https://partner.staging.leap.energy/account?settings=webhooks](https://partner.staging.leap.energy/account?settings=webhooks)
  - Production: [https://partner.leap.energy/account?settings=webhooks](https://partner.leap.energy/account?settings=webhooks)
- API: [Create Webhook endpoint](https://developer.leap.energy/reference/createwebhook-2)

When creating a new webhook, you'll always need to select one or more **webhook event types** to subscribe to. A list of supported event types and their example payloads is in the [Webhook Events](https://developer.leap.energy/reference/metercreated#/) section of the API reference docs.

## Step 3: Test your webhook subscription

You don't have to wait for an actual event to be triggered by Leap. You can use the [Test Webhook](https://developer.leap.energy/reference/testwebhook-2) endpoint to conveniently test your webhook subscription.
