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.
To get a list of webhook subscriptions, send
GET /webhooks
You can filter the results list according to the API guide on pagination, sorting and meta information
Example response
{
"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
}
}
]
}
To update a webhook object, send
PATCH /webhooks/{webhooks_id}
.
You'll need to include a request body containing the updates you want to make.
Example request
{
"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
}
}
To delete a webhook object specified by its ID, send
DELETE /webhooks/{webhook_id}
This is the final step in the "Implementing webhooks" tutorial.