Webhook
Introduction
Webhook enables you to subscribe to specific events related to Anduin Fund Subscriptions. Upon the occurrence of these events, we will dispatch an HTTP POST payload to the configured webhook URL.
Each service account can register multiple webhook URLs, facilitating subscriptions to various events across multiple fund subscriptions.
Configure your webhook
Register your webhook
You can easily register and configure your webhook URL through a REST call. When setting up a webhook, you have the flexibility to define the fund subscriptions and events that trigger payload delivery to your specified endpoint.
You can update your webhook at any time using REST calls. This includes modifying the URL, adjusting the subscribed events and fund subscriptions, as well as deleting the URL altogether. For a comprehensive list of available actions related to webhooks, please refer to the API reference.
Validation request
When initiating a new webhook, a validation request will be sent to your endpoint. This validation request is an HTTP GET request that includes a randomly generated validation key in the x-anduin-webhook-validation-key header. To successfully pass the validation, your endpoint should respond with a 200 status code and include the same header with the received validation key. The validation request can be represented using cURL as follows:
curl -X GET https:\\\\[yourdomain.com](<http://yourdomain.com/>) -H 'x-anduin-webhook-validation-key: [RANDOM_VALIDATIONKEY]'
Payload format
The payload will be presented in JSON format. The specific information included in each payload is contingent upon the event type to which you have subscribed. Detailed payload structures for each event type are outlined on this page.
Retry policy and broken URLs
Each payload delivery has a time limit of 10 seconds. If, within this timeframe, your endpoint returns a non-successful HTTP status code or fails to respond, the delivery attempt is considered unsuccessful. Anduin server will initiate an immediate retry, allowing up to a maximum of 4 attempts or until successful delivery is achieved.
If a payload remains unacknowledged after 4 attempts, the Anduin server will cease further delivery attempts and proceed to process subsequent payloads. When an endpoint skips three consecutive payloads, it will be flagged as inactive, resulting in the suspension of payload deliveries. You can monitor the active status of your endpoint by examining the isActive field within the webhook object, accessible through the Get Webhook API.
If one of your registered endpoints is marked as inactive and you have addressed the underlying issue, you can reactivate it by calling the Update Webhook API . This action will reset the failed attempts counter, allowing the Anduin server to resume sending payloads to the specified URL.
Updated about 1 year ago