You'll need to go to your server, go to Remote Requests and then create a new OAuth Client
Make note of the secret key that you'll see at the top, as well as the server id you'll see on the Remote Requests page.
Unfortunately the API doesn't seem to support a restart command, but I'll see if I can make a PR to implement one. In the meantime the following script is rather hacky but will stop and then restart the server.
https://gist.github.com/lukeberry99/70fc95a27bcc0d371ccceee1d754695f
You'll need to edit the script and add your IP address/domain (include http://), your server id from the Remote Requests page, your secret, and your client id.
You'll also a variable called DELAY - this is how long the script will wait after sending the stop command before issuing the start command, 10 seconds works for on a relatively small PaperMC server but may need tinkering.
Let me know if this works for you, or if you need any help.