Short URL

post
Get Short URL

https://nyxbot.xyz/api/v1/url/shorten
Use a POST request to shorten a URL.
Request
Response
Request
Body Parameters
vanity
optional
string
Make the shortened URL a vanity URL.
uid
required
string
User ID that is requesting to shorten a URL
url
required
string
Long URL that needs to be shortened
Response
200: OK
Returns a shortened URL
{ "sitename": "{URL Title}", "time": "{Time taken in seconds.}", "request": "{Original URL}", "result": "{Shortened URL}" }
403: Forbidden
If a URL is already shortened, or a vanity exists, the API will return a 403.
{ "sitename": "Cannot shorten an already shortened URL!", "time": "-.--- seconds", "request": "{Original URL}", "result": "Invalid URL!" }

‚Äč