1pt.co API

October 4, 2023 ยท View on GitHub

The 1pt.co API is public so anyone can create a shortened URL

Endpoint: csclub.uwaterloo.ca/~phthakka/1pt-express

Warning

The old endpoint (csclub.uwaterloo.ca/~phthakka/1pt) is still live but will soon be deprecated.

/addURL

Method: POST

ParameterDescriptionExample
longRequired - The long URL to shortenhttps://www.param.me
shortOptional - The part after 1pt.co/ that will redirect to your long URL. If this paramter is not provided or the requested short URL is already taken, it will return a random 5-letter stringparam

Example Response

{
  "message": "Added!",
  "short": "param",
  "long": "https://www.param.me"
}

With this example 1pt.co/param will redirect to https://www.param.me

Note

If the requested short is taken, it will return a random 5-letter string along with the flag receivedRequestedShort: false