How can I create an endpoint or route in Mautic?

I would like to use SendGrid Inbound Parse Webhook and I need to specify the URL where SendGrid should send the parsed email data.
I have a PHP script to handle the incoming data, but not sure how to make it available in Mautic as a public URL.
Could anyone point me in the right direction to achieve this? Thank you!

Look into how mautic core does the endpoints (inspect the config.php of bundle).From there you should be able to get out the controller name and the method and check the controller file to see how controllers and endpoints are implemented.