Delete Webhook

Delete Webhook

To remove a webhook from a file or folder in Box you will need to provide our API with the ID of the webhook to remove.

curl -i -X DELETE "" \
     -H "Authorization: Bearer <ACCESS_TOKEN>"
print('The webhook was successfully deleted!')
client.webhooks.delete(webhookId: "22222") { result: Result<Void, BoxSDKError>} in
    guard case .success = result else {
        print("Error deleting webhook")

    print("Webhook successfully deleted")

Webhook ID

To find the ID of the webhook, use the List all webhooks endpoint.

Additional reasons for deletion

Using the API is not the only way a webhook can be deleted.

The following reasons can cause webhooks to be deleted.

  1. Deleting a Box application deletes all webhooks associated with the application.
  2. Deleting all access tokens associated with a webhook.
  3. If webhooks could not be delivered for a system-determined amount of time then Box automatically removes the webhook.

In all of these cases Box would send a webhook payload with the WEBHOOK.DELETED event name to the notification URL. In this case the body of the payload will include the following additional information.

"additional_info": {
  "reason": "auto_cleanup"