Creating a new url is as easy as sending a post request to /api/new with the json object:
{
"url": "https://google.com"
}
It will return something like this
{
"id":"1234",
ok: true,
token: "P123456789Y"
}
I highly recommend you
store the token because you can do other things with it like delete the url and more in the future.
Like I said in the other chapter you can do a lot of things with the token. If you send a POST request to
/api/delete with the token as the value. Example:
{
"token":"P123456789Y"
}
and the URL will be deleted forever.