All pages
Powered by GitBook
1 of 1

Loading...

Update webhook subscription

Use case

Here you can learn how to update an existing webhook subscription.

Use case data
API parameters with values

Updating webhook subscription with ID-1004 to the new destination: https://webhook.site/b43453ab-6eda-4523-b04d-8b23b3a5d0e6

Sample API call

To update the existing webhook subscription, make the API call below:

https://notification-api.sandbox.tuumplatform.com/api/v1/notifications/subscriptions/ID-1004

Learn more about the endpoint in the Tuum developer portal.

Sample request

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"
}'

Sample response

Below you will find the response body to the sample request:

Response
{}

Result

The destination of the webhook subscription with ID-1004 is updated.

You can validate the API call's outcome with the request: GET api/v1/notifications/subscriptions

{
  "url": "https://webhook.site/b43453ab-6eda-4523-b04d-8b23b3a5d0e6",
  "version": 1,
  "notificationTypeCode": "PERSON_UPDATED"
}