Let's Shorten That Url

© 2013 — 2016 Luc Didry — License: WTFPLAboutAPIStatistics

Lstu API

POST /a
Parameters:
  • lsturl mandatory
    URL to shorten
  • lsturl-custom optional
    Custom shortened text
  • format optional
    If equal to "json", response will be in JSON format, HTML format otherwise
Response:
  • JSON: success
    {"url":"https:\/\/fiat-tux.fr","short":"https:\/\/lstu.fr\/XzQBd6eF","success":true}
  • JSON: failure
    {"msg":"Failure reason","success":false}
  • Response for HTML format
    You will be redirected to the Lstu interface with a message giving the shortened URL
GET /shortened_url
Response:
  • You will be redirected to the targeted URL or to the Lstu interface with a message giving the failure reason
GET /shortened_url.json
Response:
  • JSON: success
    {"url":"https:\/\/fiat-tux.fr","success":true}
  • JSON: failure
    {"msg":"Failure reason","success":false}