Managing Webhooks
As well as simply registering new Webhooks within the Upvest Investment API, we provide the ability to list, update and delete the Webhooks you've registered.
1 List Webhooks
To get a list of Webhooks send GET /webhooks
.
You can filter the results list according to the API guide on pagination, sorting and meta information
The resulting list could look like this:
{
"meta": {
"offset": 0,
"limit": 100,
"count": 1,
"total_count": 1,
"sort": "id",
"order": "ASC"
},
"data": [
{
"id": "a8eb3540-5a84-40f9-b2bb-7f99f282fc5a",
"created_at": "2021-07-21T14:10:00.00Z",
"updated_at": "2021-07-21T14:10:00.00Z",
"title": "User webhook",
"url": "https://tenant.tld/webhooks/users",
"type": [
"USER"
],
"enabled": false,
"config": {
"delay": "5s",
"max_package_size": 10240
}
}
]
}
2 Update Webhooks
To update a Webhook object send PATCH /webhooks{id}
. You'll need to include a request body that looks like this example:
{
"id": "a8eb3540-5a84-40f9-b2bb-7f99f282fc5a",
"created_at": "2021-07-21T14:10:00.00Z",
"updated_at": "2021-07-21T14:10:00.00Z",
"title": "User webhook",
"url": "https://tenant.tld/webhooks/users",
"type": [
"USER"
],
"enabled": true,
"config": {
"delay": "5s",
"max_package_size": 10240
}
}
2 Delete Webhooks
To delete a Webhook object specified by its ID, send a DELETE /webhooks/{id}
request.
✔ You're ready to manage Webhooks!
Congratulations! If you've read and understood this content, you will be able to manage your Webhooks within the Upvest Investment API.
This is the final step in the "Implementing Webhooks" tutorial.