Documented here in the API you see that the syntax of the call is https://api.telegram.org/bot<token>/setwebhook?url=<yoururl>
. For the most part this is it. If you need more information, take a look at this guide or look at the requirements (like using HTTPS).
After you set this, you can use the /getwebhookinfo
method to get information about your webhook (JSON file). The attributes mentioned in this file are explained in the documentation.
Note that there are several ways to set up your webhook. If you have problems with your webhook always describe how you set up your webhook (with custom certificate/ without ...). Furthermore if you got problems always check if you met the requirements of the webhooks and if your HTTPS certificate is valid.