To enable webhook events, you need to register webhook endpoints. After you register them, Panora can push real-time event data to your application’s webhook endpoint when events happen in your Panora account. Panora uses HTTPS to send webhook events to your app as a JSON payload that includes an Event object.

1

Create a webhook endpoint handler to receive event data POST requests.

TYPES OF EVENTS
Use the Panora API reference to identify the Event objects your webhook handler needs to process.

Set up an HTTP or HTTPS endpoint function that can accept webhook requests with a POST method. If you’re still developing your endpoint function on your local machine, it can use HTTP. After it’s publicly accessible, your webhook endpoint function must use HTTPS. Set up your endpoint function so that it:

  • Handles POST requests with a JSON payload consisting of an event object.
  • Quickly returns a successful status code (2xx) prior to any complex logic that could cause a timeout. For example, you must return a 200 response before updating a customer’s invoice as paid in your accounting system.

Example endpoint
This code snippet is a webhook function configured to check that the event type was received, to handle the event, and return a 200 response.

2

Register your endpoint within Panora using the Dashboard or the API.

Register the webhook endpoint’s accessible URL using the Webhooks section or the API so Panora knows where to deliver events.

Webhook URL format

The URL format to register a webhook endpoint is:

https://<your-website>/<your-webhook-endpoint>

For example, if your domain is https://mycompanysite.com and the route to your webhook endpoint is @app.route('/panora_webhooks', methods=['POST']), specify https://mycompanysite.com/panora_webhooks as the Endpoint URL.

Add a webhook endpoint

Navigate to the Configuration section and head to the Webhooks tab.

Register a webhook endpoint with the Panora API

You can also programmatically create webhook endpoints.

The following example creates an endpoint that notifies you when a connection is created.

3

Secure your webhook endpoint.

We highly recommend you secure your integration by ensuring your handler verifies that all webhook requests are generated by Panora. You can choose to verify webhook signatures using our official libraries or verify them manually.

Verify webhook signatures with official library

We recommend using our official libraries to verify signatures. You perform the verification by providing the event payload, the Panora-Signature header, and the endpoint’s secret. If verification fails, you get an error.