Deactivate webhook
If you have already registered a webhook with the notification service, you can deactivate the webhook by sending a PATCH request to the webhooks/{id}/deactivation resource (using the id of the corresponding webhook).
The payload of the PATCH request must contain the status parameter with the value deactivated.
Example
Request
Enter the following curl command, remembering to replace the ${VARNAME} variables with the appropriate values:
curl --request PATCH --location "${API_BASE_URL}/api/notifications/v1/webhooks" \
--header "Content-Type: application/json" \
--header "Accept: application/json, application/problem+json" \
--header "Authorization: Bearer ${API_ACCESS_TOKEN}" \
--data '{
"status": "deactivated"
}'
Response
On success, returns a 200 status code and a JSON object containing a copy of the webhook registration record, which includes the unique identifier (UUID) for the webhook in the id property.
{
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"createdAt": "2006-01-02T15:04:05Z07:00",
"updatedAt": "2006-01-02T15:04:05Z07:00",
"targetURL": "https://example.com/notify",
"auth": {
"type": "basic",
"username": "USERNAME"
},
"status": "deactivated"
}