Shorturl API \ Shorten an URL PHP SDK

Shorturls /shorturls.json List all shorturls Create a shorturl
Shorturl /shorturls/<shorturl_token>.json Read a shorturl Delete a shorturl


Request: the code to send to the API

Send a POST request with the following data to the resource /shorturls.json to create a short version of an existing URL. Whenever a user clicks on the short version of the url, that click will be tracked and the user will then be forwarded to the original url.

The click statistics can be obtained by retrieving the details of the shortened url.

POST data to be included in the request

					"original_url": "#url#"
Key Description
* #url# The URL for which you want to create a short url.

Result: the code returned by the API

The API will return the short version of your URL and a shorturl_token that uniquely identifies the created entry.

			"response": {
				"request": {
					"date": "Fri, 16 Sep 2011 16:18:49 +0200",
					"resource": "/shorturls.json",
					"status": {
						"flag": "success",
						"code": 200
				"result": {
					"data": {
						"shorturl": {
							"shorturl_token": "mOTlo",
							"original_url": "",
							"short_url": "",
							"date_creation": "Fri, 16 Sep 2011 16:18:49 +0200",
							"num_referrals": 0

User Contributed Notes