Link shortening

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 - alias - if not already taken
domain Your desired domain to be used (only with action shorten)
noTitle noTitle=1
Faster API response time
This parameter disables getting the page title from the source page meta tag which results in faster API response time
Available for Team Enterprise plan
public public=1
Settings public click stats for shortened link via API
Available from Single plan

Examples

Errors

400 Incorrect actionAction is null or incorrect
400 Url parameter is nullParameter url was not sent
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
401 This domain is not owned by the team. To use this domain, it must be added to the team by the team owner.It occurs when Team does not own the provided domain. To use domain in Team - it must be added to the team by the Team Owner
409 Provided link is already shortenedProvided link's domain is a registered cutt.ly custom domain
409 Provided link is incorrectProvided url is not a link
409 Provided alias contains illegal charactersName parameter contains illegal characters

Link editing

Editing short links

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

key key=[API_KEY]
Your API key.
Required
action action=edit
To initiate the link editing.
Required
url url=[SHORT_LINK]
Your shortened link to be edited.
Required
domain domain=[DOMAIN] Your desired domain to be used (only with action shorten).
Optional
tag tag=[TAG]
The TAG you want to add for shortened link.
Optional
name name=[NEW_ALIAS]
New alias / name, if not already taken.
Optional
delete delete=1
It will delete your shortened link.
Optional
source source=[FULL LINK]
It will change the source url of shortened link. You can change source URL depending at your subscription plan.
[FULL LINK] should be passed through urlencode();
Optional
mobile Sets up alternative redirects depending on the operating system on mobile devices.
Parameter mobile is case sensitive.
redirect | alternative all other devices
android | Android
ios | iOs
windowsMobile | Windows Mobile
Optional
destination An encoded url to be assigned in the mobile option. If the parameter is omitted (only mobile parameter is posted) then the destination from mobile option will be removed.
Optional
unique Sets a unique stat count for a short link.
unique=0 | It removes counting unique clicks.
unique=1 | for Single subscription plan. The time of uniqueness is 15 minutes.
unique=15-1440 | for Team subscription plans. Time to count unique clicks ranging from 15 minutes to 1440 minutes (24h).
Optional
title title=[LINK TITLE]
It will change the title of url of shortened link. You can change the short link title depending at your subscription plan.
Optional

Status for editing short links

status => 1OK
status => 2Could not save in database
status => 3The url does not exist or you do not own it
status => 4 (for source and for destination only)URL didn't pass the validation

Errors

Insufficient subscription levelWhen using parameters without the required subscription.
Unique time must be between 15 - 1440 minutesTime to count unique clicks must be from 15 minutes to 1440 minutes (24h).
Provided alias is unavailableThis alias is already in use and cannot be used.

Link analytics

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
actionYour action to perform, either shorten or stats. Required
urlThe shortened URL you want to check statistics of. E.g. https://cutt.ly/short or https://yourdomain.com/short. Required
date_from It returns the number of clicks from a given period, both total and for social media. The correct format of the given dates: YYYY-MM-DD, e.g. 2021-03-02
Can be used with the second parameter date_to or separately
Available from Team subscription plan.
Optional
date_to It returns the number of clicks from a given period, both total and for social media. The correct format of the given dates: YYYY-MM-DD, e.g. 2021-03-02
Can be used with the second parameter date_from or separately
Available from Team subscription plan.
Optional

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
stats=>botsThe number of clicks from bots

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
stats=>devices=>brand=>$i=>tag displaying the brand from which the link was clicked
stats=>devices=>brand=>$i=>clicks displaying the number of clicks from this brand
stats=>devices=>lang=>$i=>tag displaying the language set on the device from which the link was clicked
stats=>devices=>lang=>$i=>clicks displaying the number of clicks from this language
stats=>bots=>bots=>$i=>name displaying the bot from which the link was clicked
stats=>bots=>bots=>$i=>clicks displaying the number of clicks from this bot

Errors

Incorrect date formatIn case the date format is incorrect. The correct format of the given dates: YYYY-MM-DD, e.g. 2021-03-02
Insufficient subscription levelWhen using parameters without the required subscription plan.

API limits

API limits per account depending on subscription plan
Free Single Team Team Enterprise
not available not available 180 requests / 60 sec. 360 requests / 60 sec.
more on request after individual calculation - additionally payable