Deactivate webhook

If you have already registered a webhook with the notification service, you can deactivate it by sending a PATCH request to the webhooks/{webhookId} resource (using the id of the corresponding webhook) with a JSON body specifying {"status": "inactive"}. The webhook is preserved (not removed) and its status is set to inactive. Only the customer that owns the webhook may deactivate it.

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/${WEBHOOK_ID}" \
--header "Accept: application/json, application/problem+json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${API_ACCESS_TOKEN}" \
--data '{"status": "inactive"}'

Response

On success, returns a 200 status code and a JSON object containing the updated webhook registration record with status set to inactive.

{
  "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": "inactive"
}