Handling webhooks
This page explains how webhook events from Hypertune should be handled by your server.
Request structure
When an event occurs in your project, we'll notify all the subscribed active webhooks.
We do this by sending them each a POST request to their payload URLs. This request has a body that contains information about the event, for example:
Additionally, it will include the X-Hypertune-Signature
header which will be the HMAC-SHA-256 digest in hexadecimal format of the raw body, using the webhook secret.
We will retry webhook sends with exponential backoff until a limit, so your implementation should be idempotent and handle missing hooks.
Processing webhooks
To process a request you should:
Verify it is from Hypertune. To do this, validate that the
X-Hypertune-Signature
matches the definition above, using the secret you configured when setting up your webhook.Within 10 seconds, respond with a successful status code: one in the range 200-299 inclusive.
JavaScript example
Last updated