You don’t need to create an extra file for that.
Simply place something like the following into your themes functions.php file:
function grab_my_very_own_webhook(){
if( ! isset( $_GET['whateveriwant'] ) ){
return;
}
//create your own logic here
}
add_action( 'init', 'grab_my_very_own_webhook' );
In case you want to grab some data that is sent by the webhook, you need to catch it and validate it properly.
There’s a plugin that takes that work from you nicely: WP Webhooks
WP Webhooks will catch the data for you and you simply need to write an extension where you handle the data you want to use. They have a custom plugin template available, which you can use to create your own endpoint to use the validated data.