Testing webhooks
Once you've implemented a webhook handler and registered it within the Upvest Investment API, it's time to test if it is working as expected.
To make sure that you have set up your webhook correctly, send the following request in order to trigger test webhook data to be sent to the URL you specified when you registered the webhook.
Path parameter | Description |
---|---|
id | The ID specified is the one included in the payload of the response to a successful POST /webhooks . |
The response to the trigger request contains the body, status and headers that we received in response to the POST request to https://tenant.tld/webhooks/users
. The following example shows the response to a successful test:
Example response
{
"url": "https://tenant.tld/webhooks/users",
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Origin": "*",
"Content-Length": "19",
"Content-Type": "application/json; charset=utf-8",
"Date": "Fri, 15 Oct 2021 16:03:17 GMT",
"X-Powered-By": "Express"
},
"body": "{ \"success\": true }"
}
}
If you've read and understood this content, you should be ready to test your webhooks.