Maksudur Rahman Maateen edited this page Jan 23, 2016 · 2 revisions

#Open API Documentation

We have developed an API for developers. With this API, developers can use your website to create short URL by requesting in a pre-determined manner.

Let's say you have set up Py-URL-Shortener as

==API version-1.0==


  • API:

  • Parameter:

    • long_url = The Original URL of which you wanna build a short URL.
  • HTTP Method:

    • POST
  • Return values:

    • state : 'ok' or 'error'
    • long_url : Original URL
    • short_url : Short URL
    • 'message' : If state is ok, then it is Null. Otherwise, it contains the error message.

Note: The data come to the API must be marked as JSON. Also, the data returned by the API will be in JSON format.


On Terminal we will run the following command:

curl -H "Content-Type: application/json" -X POST -d '{"long_url":""}'

Hope, it will produce something like below:

  "long_url": "",
  "message": "",
  "short_url": "",
  "state": "ok"

That's all till now.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.