URL Shortener

To shorten the link with team, open the file https://cutt.ly/team/API/index.php remotely (eg via the php file_get_contents), and in the parameters: key enter your team API key, action specify your action, either shorten to shorten a link or stats to get link analytics. url enter the address to be shortened (it should be encoded so any special characters will be interpreted correctly), name specify the preferred shortening of the link, domain specify if you want to use your own domain, to choose your team domain to be used, enter its name.

Possible parameters

key Your API key. Required
action Your action to perform, either shorten or stats. Required
url Either your long link to be shortened or your short link to get analytics. Required
name Your desired short link if not already taken
domain Your desired domain to be used (only with action shorten)

Examples

Errors

401 UnauthorizedYour API key is incorrect and a json with parameter auth:false has been returned
401 Subscription has expiredTeam owner's subscription has expired
400 Incorrect actionAction is null or incorrect
400 Url parameter is nullParameter url was not sent
409 Provided link is already shortenedProvided link's domain is a registered cutt.ly domain
409 Provided link is incorrectProvided url is not a link
409 Provided alias contains illegal charactersName parameter contains illegal characters

Analytics

In order to access URL statistics, open the file https://cutt.ly/team/API/index.php remotely (eg via the php file_get_contents), with the following parameters:

keyYour Team API key. Required
actionThe shortened URL you want to check statistics of. Required
urlThe shortened URL you want to check statistics of. E.g. https://cutt.ly/short or https://yourdomain.com/short. Required

Examples

As a reply, json string will be sent, containing following data:

stats=>status: 0This shortened link does not exist
stats=>status: 1This link exists and the data has been downloaded
stats=>status: 2Invalid API key

If status is equal to 1

stats=>dateDate of shortening the link
stats=>clicksTotal number of clicks
stats=>titleTitle of the shortened link
stats=>fullLinkOriginal link
stats=>shortLinkShortened link
stats=>facebookThe number of clicks from Facebook
stats=>twitterThe number of clicks from twitter
stats=>linkedinThe number of clicks from linkedin
stats=>restOther clicks

In order to display subsequent data, it should take place in a loop. (E.g. for, while, foreach loop)

Let $i to be the next variable in the array.

stats=>refs=>ref=>$i=>link displaying the domain from which you clicked on the link
stats=>refs=>ref=>$i=>clicks displaying the number of clicks from that domain
stats=>devices=>geo=>$i=>tag displaying the abbreviation of the country from which the link was clicked
stats=>devices=>geo=>$i=>clicks displaying the number of clicks from this country
stats=>devices=>dev=>$i=>tag displaying the type of device from which the link was clicked
stats=>devices=>dev=>$i=>clicks displaying the number of clicks from this device
stats=>devices=>sys=>$i=>tag displaying the operating system of the device from which the link was clicked
stats=>devices=>sys=>$i=>clicks displaying the number of clicks from this system
stats=>devices=>bro=>$i=>tag displaying the browser from which the link was clicked
stats=>devices=>bro=>$i=>clicks displaying the number of clicks from this browser