Here you can learn how to update an existing webhook subscription.
Updating webhook subscription with ID-1004 to the new destination: https://webhook.site/b43453ab-6eda-4523-b04d-8b23b3a5d0e6
To update the existing webhook subscription, make the API call below:
https://notification-api.sandbox.tuumplatform.com/api/v1/notifications/subscriptions/ID-1004
Here is a sample request for updating the webhook subscription:
{
"url": "https://webhook.site/b43453ab-6eda-4523-b04d-8b23b3a5d0e6",
"version": 1,
"notificationTypeCode": "PERSON_UPDATED"
}
curl -X PUT 'https://notification-api.sandbox.tuumplatform.com/api/v1/notifications/subscriptions/ID-1004' \
-H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDctMjBUMTM6NTg6MTkiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2ODk4NjE0OTl9.XY-A-LL5LfDtibp_KAIEHQDu22GCTpXpLbjlqDQWPVs' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://webhook.site/b43453ab-6eda-4523-b04d-8b23b3a5d0e6",
"version": 1,
"notificationTypeCode": "PERSON_UPDATED"
}'
Below you will find the response body to the sample request:
The destination of the webhook subscription with ID-1004
is updated.
{
"url": "https://webhook.site/b43453ab-6eda-4523-b04d-8b23b3a5d0e6",
"version": 1,
"notificationTypeCode": "PERSON_UPDATED"
}