UpGuard interview question

How would you shorten the URL for an API?