Cuttly API Shorten, Manage and Analyze Links Programmatically

Cuttly provides a REST API that lets you create short links, manage them, retrieve analytics and integrate URL shortening directly into your applications, scripts and automated workflows. The API is available on all plans including free — no paid subscription required to start. For teams and shared workspaces, the Team API provides the same capabilities operating on a shared link library with role-based access.

This page covers both APIs: the Regular API for individual accounts and the Team API for team workspaces. Both use standard GET requests and return JSON responses.

Important: API URLs are a separate section of your account

Links created via the Cuttly API are stored and managed separately from links created in the dashboard. In your Cuttly account, you will find them under API URLs — a dedicated section distinct from the main Link Management view. This separation applies to both the Regular API and the Team API. Link editing and statistics retrieval via API apply only to links previously created via the API.


What This Page Covers

  • Regular API vs Team API — which to use
  • Getting your API key
  • Regular API: shorten a URL
  • Regular API: shorten with custom alias
  • Regular API: shorten with branded domain
  • Regular API: response status codes
  • Regular API: edit a short link
  • Regular API: retrieve link statistics
  • Team API: shorten a URL
  • Team API: shorten with alias and custom domain
  • Team API: edit a short link
  • Team API: retrieve link statistics
  • TRAI SMS compliance via API
  • API rate limits per plan
  • No-code alternatives: Zapier, Make and others
  • API error reference

Regular API vs Team API — Which to Use

Cuttly provides two separate API endpoints depending on the account context you want to operate in.

AspectRegular APITeam API
Endpointcutt.ly/api/api.phpcutt.ly/team/API/index.php
Operates onYour individual accountShared team workspace
Minimum planFree (all plans)Team plan
API key locationEdit Account pageTeam edit page
URL parameter nameshorturl
Action parameterNot requiredaction=shorten required
Domain parameteruserDomain=1domain=yourbrnd.link
Links created underYour personal accountTeam workspace

Use the Regular API when you are building integrations for your personal Cuttly account — individual scripts, personal automation flows, solo developer projects. Use the Team API when links need to be created in a shared team workspace — agency workflows, multi-user applications, shared branded domain pipelines.

Getting Your API Key

Regular API key: Log in to your Cuttly account and go to Edit Account. Your API key is displayed there. Copy it — this is the key parameter in all Regular API requests.

Team API key: Log in to your Cuttly account, go to your Team workspace and open the Team edit page. The Team API key is displayed there. This key is separate from your personal API key and requires a minimum Team subscription plan.

Keep your API key secure — it authenticates all requests made on your behalf. Do not expose it in client-side code or public repositories.

Regular API — Complete Reference

Shorten a URL — Minimum Request

The simplest Regular API request requires only two parameters: your API key and the URL-encoded destination URL.

Endpoint: GET https://cutt.ly/api/api.php

ParameterValueRequiredDescription
keyyour API keyYesAuthenticates the request
shortURL-encoded destinationYesThe URL to shorten — must be passed through urlencode()

Example URL:

https://cutt.ly/api/api.php?key=YOUR_KEY&short=https%3A%2F%2Fyoursite.com%2Fpage

PHP example:

$url = urlencode('https://yoursite.com/page');
$json = file_get_contents("https://cutt.ly/api/api.php?key=YOUR_KEY&short=$url");
$data = json_decode($json, true);
// $data['url']['shortLink'] — your new short link

Important: Always pass the destination URL through urlencode() (PHP), urllib.parse.quote() (Python) or the equivalent in your language. Without URL encoding, any parameters, UTM tags or special characters in the destination URL will break the API request.

Shorten with Custom Alias (Slug)

Add the optional name parameter to specify a custom alias for the short link. If the alias is already taken, the API returns status 3.

ParameterValueRequired
keyyour API keyYes
shortURL-encoded destinationYes
namedesired slugOptional

Example:

https://cutt.ly/api/api.php?key=YOUR_KEY&short=ENCODED_URL&name=summer-sale

Result: cutt.ly/summer-sale (or yourbrnd.link/summer-sale if also using userDomain=1)

Custom alias availability: Free plan allows 3 custom slugs per month. Starter: 30/month. Single and above: unlimited.

Shorten with Branded Domain

Add userDomain=1 to use your active branded domain instead of cutt.ly. Requires a paid subscription and an active branded domain connected in your account.

ParameterValueRequired
keyyour API keyYes
shortURL-encoded destinationYes
namedesired slugOptional
userDomain1Optional — requires paid plan

Example:

https://cutt.ly/api/api.php?key=YOUR_KEY&short=ENCODED_URL&name=summer-sale&userDomain=1

Result: yourbrnd.link/summer-sale

Additional Shortening Parameters

ParameterValuePlanDescription
noTitle1Team EnterpriseDisables fetching the destination page title — results in faster API response time
public1Single+Sets click statistics for the shortened link as publicly visible

Response Status Codes

Every Regular API shortening response includes a url.status field. A successful shortening returns status 7.

StatusMeaning
1The link has already been shortened — it comes from a Cuttly domain
2The entered value is not a valid URL
3The preferred alias (name) is already taken
4Invalid API key
5The link did not pass validation — contains invalid characters
6The link's domain is blocked
7OK — the link has been shortened successfully
8Monthly link limit reached — upgrade your plan to create more links

When status is 7, the response also includes:

FieldDescription
url.dateDate the link was shortened
url.shortLinkThe new short link URL
url.fullLinkThe original destination URL
url.titleThe destination page title (empty if noTitle=1)

Edit a Short Link

The Regular API supports comprehensive link editing via the edit parameter. Most editing operations require Single plan or above.

Base editing request:

https://cutt.ly/api/api.php?key=YOUR_KEY&edit=YOUR_SHORT_LINK&[edit_parameter]=value
ParameterValuePlanDescription
tagtag stringFreeAdd a tag to the short link for campaign grouping
namenew aliasFree (3/mo)Change the alias/slug of the short link
titlenew titleSingle+Change the title of the short link
sourceURL-encoded new destinationStarter+Change the destination URL the short link redirects to
delete1FreePermanently delete the short link
passwordpassword string (blank to remove)Single+Set or remove password protection
expire0 = clicks, 1 = dateSingle+Set expiration type
expireCondYYYY-MM-DD, click count, or 0Single+Set expiration date, click limit, or remove expiration
expireRedirectURL-encoded redirectSingle+URL to redirect to after expiration condition is met
expireUnique1 or 0Single+Whether expiration click count uses unique clicks
mobileandroid, ios, windowsMobile, redirectSingle+Set OS-based mobile redirect — parameter is case sensitive
destinationURL-encoded destinationSingle+Destination URL for mobile redirect — omit to remove
unique1, 15-1440, 0Single+Unique click counting: 1 = 15 min window (Single), 15-1440 = custom window in minutes (Team), 0 = disable
abtest0, 1, 2Single+A/B test: 0 = remove, 1 = A/B test, 2 = A/B/C test
abtest_b0-100Single+Traffic percentage for B variation
abtest_bvariationURL for B variationSingle+Destination URL for B variation
abtest_c0-100Single+Traffic percentage for C variation — B + C cannot exceed 100
abtest_cvariationURL for C variationSingle+Destination URL for C variation

Edit Response Status Codes

StatusMeaning
1OK — edit successful
2Could not save to database
3The URL does not exist or you do not own it
4URL validation failed (for source and destination parameters only)

Retrieve Link Statistics

The Regular API returns click analytics for any short link you own via the stats parameter.

Statistics request:

https://cutt.ly/api/api.php?key=YOUR_KEY&stats=YOUR_SHORT_LINK

Returns: total clicks, unique clicks, device data, country breakdown, referrer data, click dates and more — the same data visible in your Cuttly dashboard.

Team API — Complete Reference

The Team API operates on a shared team workspace. It requires a minimum Team subscription plan and uses a separate API key available in the Team edit page. The endpoint and parameter structure differ from the Regular API.

Team API endpoint: https://cutt.ly/team/API/index.php

Team API: Shorten a URL

ParameterValueRequiredDescription
keyTeam API keyYesAuthenticates the request
actionshortenYesRequired action parameter — must be set to shorten
urlURL-encoded destinationYesThe URL to shorten — pass through urlencode()
namedesired slugOptionalCustom alias for the short link
domainyourbrnd.linkOptionalBranded domain to use — must be owned by the team
noTitle1OptionalFaster response — skips page title fetch (Team Enterprise)
public1OptionalSet click stats as publicly visible

PHP example:

$url = urlencode('https://yoursite.com/page');
$json = file_get_contents(
  "https://cutt.ly/team/API/index.php?key=TEAM_KEY&action=shorten&url=$url&name=campaign&domain=yourbrnd.link"
);
$data = json_decode($json, true);

Key difference from Regular API: the Team API uses url (not short) for the destination URL, action=shorten is a required parameter, and the domain is specified by name (domain=yourbrnd.link) rather than by a flag (userDomain=1).

Team API: Edit a Short Link

The Team API supports the same link editing operations as the Regular API. Use action=edit and the short link URL.

Base Team API edit request:

https://cutt.ly/team/API/index.php?key=TEAM_KEY&action=edit&url=YOUR_SHORT_LINK&[parameter]=value

Supported edit parameters in the Team API are identical to the Regular API: tag, name, source, title, delete, password, expire, expireCond, expireRedirect, mobile, destination, unique, abtest and the AB test variation parameters.

Team API: Retrieve Link Statistics

Team API statistics request:

https://cutt.ly/team/API/index.php?key=TEAM_KEY&action=stats&url=YOUR_SHORT_LINK

TRAI SMS Compliance via API

Regular API — TRAI with Branded Domain

Set userDomain=1 with a TRAI-configured branded domain or 2s.ms domain active in your account:

https://cutt.ly/api/api.php?key=YOUR_KEY&short=ENCODED_URL&userDomain=1

The HEADER is automatically appended from your active TRAI domain configuration.

Team API — TRAI with 2s.ms Domain

Use the domain parameter with the 2s.ms/HEADER format:

https://cutt.ly/team/API/index.php?key=TEAM_KEY&action=shorten&url=ENCODED_URL&domain=2s.ms/YOURHEADER

Team API — TRAI with Custom Domain and Header

Use the domain and header parameters separately:

https://cutt.ly/team/API/index.php?key=TEAM_KEY&action=shorten&url=ENCODED_URL&domain=yourbrnd.link&header=YOURHEADER

API Rate Limits Per Plan

PlanRate limitLinks / month
Free3 requests / 60 seconds30
Starter ($12/mo)6 requests / 60 seconds300
Single ($25/mo)60 requests / 60 seconds5,000
Team ($99/mo)180 requests / 60 seconds20,000
Team Enterprise ($149/mo)360 requests / 60 seconds50,000

Exceeding the rate limit returns a Too many requests error. Implement exponential backoff in your application when handling this error. Monthly link limits are separate from rate limits — reaching the monthly limit returns status 8 in the shortening response.

API Error Reference

Regular API Errors

ErrorCause and resolution
401 Unauthorized / auth:falseAPI key is incorrect. Verify the key in Edit Account.
Subscription has expired or you've reached your shortening limitUpgrade your plan or wait for monthly reset.
You do not own provided domainThe domain specified with userDomain=1 is not connected to your account.
You do not own any domainYou used userDomain=1 but have no branded domain connected.
Too many requestsRate limit exceeded — implement retry with backoff.
Insufficient subscription levelThe edit parameter used requires a higher plan.
Unique time must be between 15-1440 minutesThe unique parameter value is outside the allowed range.
Provided alias is unavailableThe name parameter value is already taken — choose a different alias.

Team API Errors

ErrorCause and resolution
400 Incorrect actionThe action parameter is missing or contains an invalid value.
400 Url parameter is nullThe url parameter was not included in the request.
401 UnauthorizedTeam API key is incorrect.
401 Subscription has expiredThe team owner's subscription has expired.
401 This domain is not owned by the teamThe specified domain is not added to the team by the team owner.
409 Provided link is already shortenedThe destination URL's domain is a registered Cuttly custom domain.
409 Provided link is incorrectThe URL is not a valid link.
409 Provided alias contains illegal charactersThe name parameter contains characters not allowed in slugs.

Practical API Use Cases

Understanding the API endpoints is the starting point. Understanding how to combine them into real workflows is where the value is. Here are the most common patterns developers use with the Cuttly API.

Use Case 1: Automated Link Creation on Content Publish

The most common Cuttly API integration pattern: every time a new piece of content is published — a blog post, a product page, a news article — a script automatically creates a branded Cuttly short link for it. The script runs as a post-publish webhook, calls the Regular API with the new page URL, and stores the returned short link in a database or CMS field alongside the content record.

Python example — create a branded short link:

import urllib.parse
import requests

key = 'YOUR_API_KEY'
url = urllib.parse.quote('https://yoursite.com/new-article')
name = 'new-article'

r = requests.get(
    f'https://cutt.ly/api/api.php?key={key}&short={url}&name={name}&userDomain=1'
)
data = r.json()

if data['url']['status'] == 7:
    short_link = data['url']['shortLink']
    print(f'Short link created: {short_link}')
else:
    print(f'Error: status {data["url"]["status"]}')

Use Case 2: Bulk Link Creation for Campaign Launch

Before a campaign launch, a script creates multiple short links — one per channel, one per product variant or one per audience segment — each with a descriptive slug and a campaign tag. The script loops through a list of destinations and slugs, respects the API rate limit with a delay between requests, and outputs a CSV of short links ready to distribute to the campaign team.

PHP example — create links for multiple channels with rate limit handling:

$key = 'YOUR_API_KEY';
$links = [
    ['url' => 'https://yoursite.com/offer', 'name' => 'offer-email'],
    ['url' => 'https://yoursite.com/offer', 'name' => 'offer-sms'],
    ['url' => 'https://yoursite.com/offer', 'name' => 'offer-instagram'],
];

foreach ($links as $link) {
    $url = urlencode($link['url']);
    $name = $link['name'];
    $json = file_get_contents(
        "https://cutt.ly/api/api.php?key={$key}&short={$url}&name={$name}&userDomain=1"
    );
    $data = json_decode($json, true);
    if ($data['url']['status'] === 7) {
        echo $data['url']['shortLink'] . PHP_EOL;
    }
    sleep(1); // respect rate limit
}

Use Case 3: Dynamic Destination Update

A campaign link is distributed across email, print and social media. Midway through the campaign, the destination page URL changes — a new landing page replaces the original, or a seasonal offer page is swapped in. Instead of redistributing new links (impossible for printed materials) or breaking the link, a single API call updates the destination URL. Every existing share of the short link immediately redirects to the new destination.

PHP example — change destination URL of an existing short link:

$key = 'YOUR_API_KEY';
$short_link = 'yourbrnd.link/summer-sale';
$new_destination = urlencode('https://yoursite.com/summer-sale-2026');

$json = file_get_contents(
    "https://cutt.ly/api/api.php?key={$key}&edit={$short_link}&source={$new_destination}"
);
$data = json_decode($json, true);
// $data['status'] === 1 means success

Requires Starter plan or above. Starter: same domain only. Single and above: any destination URL.

Use Case 4: Analytics Retrieval for Reporting

A weekly reporting script pulls click analytics for all campaign links and compiles them into a spreadsheet or dashboard. For each short link in the campaign, the script calls the Regular API with the stats parameter, retrieves click data, and writes it to a database or exports to CSV.

Python example — retrieve stats for a short link:

import requests

key = 'YOUR_API_KEY'
short_link = 'yourbrnd.link/summer-sale'

r = requests.get(
    f'https://cutt.ly/api/api.php?key={key}&stats={short_link}'
)
data = r.json()
print(data)
# Returns: total clicks, unique clicks, devices, countries, referrers, dates

Use Case 5: Team API for Agency Multi-Client Workflow

An agency manages ten client accounts, each with its own branded domain, in a single Cuttly Team workspace. A Python script processes a CSV of content URLs for each client, creates short links under the correct client domain using the Team API, and outputs a report per client. All links are created in the shared workspace — accessible to all authorized team members via the Cuttly dashboard.

Python example — Team API with per-client domain:

import urllib.parse
import requests

team_key = 'YOUR_TEAM_API_KEY'

clients = [
    {'url': 'https://client-a.com/product', 'name': 'product-launch', 'domain': 'clienta.link'},
    {'url': 'https://client-b.com/offer',   'name': 'spring-offer',   'domain': 'clientb.link'},
]

for client in clients:
    url = urllib.parse.quote(client['url'])
    r = requests.get(
        f"https://cutt.ly/team/API/index.php"
        f"?key={team_key}&action=shorten&url={url}"
        f"&name={client['name']}&domain={client['domain']}"
    )
    data = r.json()
    print(data)

Use Case 6: A/B Test Setup via API

A marketing team wants to split traffic between two landing page variants. Using the edit API with the abtest parameter, they configure a 50/50 A/B test on an existing short link — 50% of clicks go to variant A (the original destination), 50% go to variant B. After a week, they pull stats via API, compare click data per variant and update the source URL to the winning variant.

PHP example — set up A/B test on existing short link:

$key = 'YOUR_API_KEY';
$short_link = 'yourbrnd.link/landing';
$variant_b = urlencode('https://yoursite.com/landing-variant-b');

$json = file_get_contents(
    "https://cutt.ly/api/api.php?key={$key}"
    . "&edit={$short_link}"
    . "&abtest=1"           // 1 = A/B test
    . "&abtest_b=50"        // 50% to variant B
    . "&abtest_bvariation={$variant_b}"
);
$data = json_decode($json, true);
// status 1 = success

Requires Single plan or above.

Use Case 7: Link Expiration for Time-Limited Offers

A flash sale promotion has a hard end date. The short link is created normally, then the expiration is set via API — after the sale end date, the link automatically stops redirecting to the sale page and redirects instead to the main shop homepage. No manual link management required at the end of the promotion.

PHP example — set date expiration with redirect:

$key = 'YOUR_API_KEY';
$short_link = 'yourbrnd.link/flash-sale';
$redirect_after = urlencode('https://yoursite.com/shop');

$json = file_get_contents(
    "https://cutt.ly/api/api.php?key={$key}"
    . "&edit={$short_link}"
    . "&expire=1"                      // 1 = date-based expiration
    . "&expireCond=2026-06-30"         // expires on 30 June 2026
    . "&expireRedirect={$redirect_after}"
);
$data = json_decode($json, true);

Requires Single plan or above.

JavaScript / Node.js API Integration

For Node.js applications and serverless functions, the Cuttly API is accessible via standard fetch or axios. Always handle the URL encoding server-side — never expose your API key in client-side JavaScript.

Node.js example — shorten with branded domain:

const key = process.env.CUTTLY_API_KEY;
const destination = encodeURIComponent('https://yoursite.com/page');
const name = 'my-link';

const response = await fetch(
  `https://cutt.ly/api/api.php?key=${key}&short=${destination}&name=${name}&userDomain=1`
);
const data = await response.json();

if (data.url.status === 7) {
  console.log('Short link:', data.url.shortLink);
} else {
  console.error('API error, status:', data.url.status);
}

Handling API Responses Correctly

The Cuttly API always returns JSON. A robust integration handles all possible status codes rather than assuming success. Common mistakes and how to avoid them:

  • Always check url.status before using url.shortLink. Status 7 is the only success state. All other values indicate an error that must be handled — do not assume the response contains a short link.
  • Always URL-encode the destination. Raw URLs with query parameters, UTM tags or special characters will cause status 5 (validation failed). Use urlencode(), urllib.parse.quote() or encodeURIComponent() depending on your language.
  • Handle status 3 (alias taken). If you generate slugs programmatically, build a retry mechanism that appends a suffix when the first slug is taken.
  • Implement rate limit backoff. At high request volumes — Single plan (60 req/60s) or above — implement exponential backoff when receiving Too many requests errors.
  • Store returned short links. The API does not provide a "list all links" endpoint — store the url.shortLink value returned at creation time in your own database for later editing or stats retrieval.
  • Team API: always include action. Missing the action parameter in a Team API request returns 400 Incorrect action — the most common Team API mistake.

No-Code Alternatives to the API

PlatformBest forCode required
ZapierConnecting Cuttly with 7,000+ apps visuallyNo
MakeVisual automation scenarios with complex logicNo
Boost.spaceEnterprise data synchronization pipelinesNo
PipedreamEvent-driven workflows for developersLow-code
Laravel packagePHP/Laravel applicationsYes — PHP
NuGet package.NET/C# applicationsYes — C#

Plan Guide for API Usage

The Free plan ($0) includes API access for link shortening and statistics retrieval. Rate limit: 3 requests/60s. Monthly limit: 30 links. No branded domain via API on free plan (userDomain=1 requires paid plan).

The Starter plan ($12/month) adds userDomain=1 support for branded domains via API. Rate limit: 6 requests/60s. Monthly limit: 300 links. Destination URL editing via source parameter available (same domain only).

The Single plan ($25/month) unlocks the full editing API — password, expiration, mobile redirects, A/B testing, unique click windows, public stats. Rate limit: 60 requests/60s. Monthly limit: 5,000 links. Unlimited custom slugs.

The Team plan ($99/month) enables the Team API. Rate limit: 180 requests/60s. Monthly limit: 20,000 links. Unique click window configurable from 15 to 1440 minutes.

The Team Enterprise plan ($149/month) adds noTitle=1 parameter for maximum API response speed. Rate limit: 360 requests/60s. Monthly limit: 50,000 links.

FAQ: Cuttly API

How do I get a Cuttly API key?

Your Regular API key is available in Edit Account in your Cuttly dashboard. The Team API key is in the Team edit page. Both require a registered Cuttly account — the free plan includes Regular API access.

What is the difference between the Regular API and the Team API?

The Regular API (cutt.ly/api/api.php) operates on your individual account — links are created under your personal profile. The Team API (cutt.ly/team/API/index.php) operates on a shared team workspace and requires a minimum Team plan. The Team API uses different parameter names: url instead of short, and action=shorten is required.

Can I use a branded domain with the Cuttly API?

Yes. In the Regular API, add userDomain=1 — requires a paid plan and an active branded domain. In the Team API, specify domain=yourbrnd.link — the domain must be owned by the team.

What are the API rate limits?

Free: 3 req/60s. Starter: 6 req/60s. Single: 60 req/60s. Team: 180 req/60s. Team Enterprise: 360 req/60s. Exceeding the rate limit returns a Too many requests error — implement retry with backoff in your application.

Can I edit or delete a short link via the API?

Yes. The Regular API supports editing via the edit parameter — change alias, destination URL, title, add tags, set password, expiration, mobile redirects, A/B test rotation and delete links. Most editing features require Single plan or above. The Team API uses action=edit.

Can I retrieve link analytics via the API?

Yes. The Regular API returns link statistics via the stats parameter. The Team API uses action=stats. Both return the same analytics data available in the Cuttly dashboard: total clicks, unique clicks, device breakdown, country data, referrer data and more.

URL Shortener

Start free — API access included on all plans including free. No credit card required.

Cuttly - Consistently Rated
Among Top URL Shorteners

Cuttly isn’t just another URL shortener. Our platform is trusted and recognized by top industry players like G2 and SaaSworthy. We're proud to be consistently rated as a High Performer in URL Shortening and Link Management, ensuring that our users get reliable, innovative, and high-performing tools.