My demo URL shortener (GH repo here) is a REST API accepts a regular URL via POST and returns a short code that can be used to get a redirect to the original URL. Users of the API receive a short code and a secret administrative key that they can use to check usage statistics for that short code and optionally delete the short code so it won’t work anymore.