When configuring a webhook, you can choose which events you would like to receive payloads for. You can even opt-in to all current and future events. Only subscribing to the specific events you plan on handling is useful for limiting the number of HTTP requests to your server. You can change the list of subscribed events through the API or UI anytime.

Each event corresponds to a certain set of actions that can happen to your tenancy. For example, if you subscribe to the quote requests event you'll receive detailed payloads every time an quote request completes, fails, etc.

The available events are:

Name Description
* Any time any event is triggered (Wildcard Event).
question_set Triggered when a question set is completed
quote_request Triggered when a quote request is completed or failed
application_form Triggered when an application form is quoted or inactive

Wildcard Event

We also support a wildcard (*) that will match all supported events. When you add the wildcard event, we'll replace any existing events you have configured with the wildcard event and send you payloads for all supported events. You'll also automatically get any new events we might add in the future.


Delivery headers

HTTP POST payloads that are delivered to your webhook's configured URL endpoint will contain several special headers:

Header Description
X-Emperor-Event Name of the event type that triggered the delivery. The event can either be subject:action or subject (i.e. application_form:quoted or quote_request).
X-Emperor-Delivery A UUID to identify the delivery.
X-Signature The HMAC hex digest of the response body. This header will be sent if the webhook is configured with a secret. The HMAC hex digest is generated using the sha256 hash function and the secret as the HMAC key.

Also, the User-Agent for the requests will be Hookshot.

Example delivery

POST /payload HTTP/1.1
Host: localhost:443
X-Emperor-Delivery: dcd2339f-0abc-412f-b7e6-6e1fd359e7c4
X-Signature: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
User-Agent: Hookshot
Content-Type: application/json
Content-Length: 12345
X-Emperor-Event: quote_request:completed
  "request_status": "completed",
  "annual_price": "1032.0",
  "monthly_price": "86.0",
  "quote_number": "123789",
  "score": "100.0",

results matching ""

    No results matching ""