Authorization

If you want to shorten your URLs with our API, we ask to obtain an API TOKEN before shortening, that can be found in your profile page.

The usage of this API is free to use, but for performance reason, the usage is limited to 100 requests per user/day

Create url

Request endpoint:https://shtn.me/api/create_url

Request type:JSON

HTTP method:POST

Parameter Type Required Description
api_token string YES The API token for the authentication. You can find it here
url string YES The long url to shorten

Request

                                      
{
	"api_token":"ee877666e62c1d5ce20d1b6b521737d151d148d81926bde82a505213ae4b8395",
	"url":"google.com"
}
                                      
                                

Response

                                    
{
  "error": null,
  "data": {
    "code": "QA6pGt",
    "url": "http://google.com",
    "shrinked_url": "https://shtn.me/u/QA6pGt"
  }
}
                                    
                                

Get user urls list

Request endpoint:https://shtn.me/api/get_urls

Request type:JSON

HTTP method:POST

Parameter Type Required Description
api_token string YES The API token for the authentication. You can find it here

Request

                                      
{
	"api_token":"ee877666e62c1d5ce20d1b6b521737d151d148d81926bde82a505213ae4b8395"
}
                                      
                                

Response

                                    
{
  "error": null,
  "data": {
    "code": "QA6pGt",
    "url": "http://google.com",
    "enabled": true,
    "shrinked_url": "https://shtn.me/u/QA6pGt"
    "created_at": "2019-08-21 14:34:50"
  }
}
                                    
                                

Get url stats

Request endpoint: https://shtn.me/ api/stats

Request type:JSON

HTTP method:POST

Parameter Type Required Description
api_token string YES The API token for the authentication. You can find it here
code string YES The url code received in the create_url response object

Request

                                      
{
	"api_token":"ee877666e62c1d5ce20d1b6b521737d151d148d81926bde82a505213ae4b8395",
	"code":"QA6pGt"
}
                                      
                                

Response

                                    
{
  "error": null,
  "data": {
    "url": "http://google.com",
    "stats": [
      {
        "browser": "Chrome 76.0.3809.100",
        "os": "Windows 10",
        "created_at": "2019-08-17 18:46:46",
        "latitude": 44.893,
        "longitude": 26.0967
      },
      {
        "browser": "Chrome 75.0.1809.500",
        "os": "Mac OS",
        "created_at": "2019-08-17 15:13:32",
        "latitude": 46.488,
        "longitude": 27.0367
      }
    ]
  }
}