Path.im API may be used through programming languages such as PHP to shorten URLs. The following is an example of how you can do so with a single line of code in PHP.
PHP Example