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.
| Aspect | Regular API | Team API |
|---|---|---|
| Endpoint | cutt.ly/api/api.php | cutt.ly/team/API/index.php |
| Operates on | Your individual account | Shared team workspace |
| Minimum plan | Free (all plans) | Team plan |
| API key location | Edit Account page | Team edit page |
| URL parameter name | short | url |
| Action parameter | Not required | action=shorten required |
| Domain parameter | userDomain=1 | domain=yourbrnd.link |
| Links created under | Your personal account | Team 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
| Parameter | Value | Required | Description |
|---|---|---|---|
key | your API key | Yes | Authenticates the request |
short | URL-encoded destination | Yes | The 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.
| Parameter | Value | Required |
|---|---|---|
key | your API key | Yes |
short | URL-encoded destination | Yes |
name | desired slug | Optional |
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.
| Parameter | Value | Required |
|---|---|---|
key | your API key | Yes |
short | URL-encoded destination | Yes |
name | desired slug | Optional |
userDomain | 1 | Optional — 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
| Parameter | Value | Plan | Description |
|---|---|---|---|
noTitle | 1 | Team Enterprise | Disables fetching the destination page title — results in faster API response time |
public | 1 | Single+ | 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.
| Status | Meaning |
|---|---|
1 | The link has already been shortened — it comes from a Cuttly domain |
2 | The entered value is not a valid URL |
3 | The preferred alias (name) is already taken |
4 | Invalid API key |
5 | The link did not pass validation — contains invalid characters |
6 | The link's domain is blocked |
| 7 | OK — the link has been shortened successfully |
8 | Monthly link limit reached — upgrade your plan to create more links |
When status is 7, the response also includes:
| Field | Description |
|---|---|
url.date | Date the link was shortened |
url.shortLink | The new short link URL |
url.fullLink | The original destination URL |
url.title | The 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
| Parameter | Value | Plan | Description |
|---|---|---|---|
tag | tag string | Free | Add a tag to the short link for campaign grouping |
name | new alias | Free (3/mo) | Change the alias/slug of the short link |
title | new title | Single+ | Change the title of the short link |
source | URL-encoded new destination | Starter+ | Change the destination URL the short link redirects to |
delete | 1 | Free | Permanently delete the short link |
password | password string (blank to remove) | Single+ | Set or remove password protection |
expire | 0 = clicks, 1 = date | Single+ | Set expiration type |
expireCond | YYYY-MM-DD, click count, or 0 | Single+ | Set expiration date, click limit, or remove expiration |
expireRedirect | URL-encoded redirect | Single+ | URL to redirect to after expiration condition is met |
expireUnique | 1 or 0 | Single+ | Whether expiration click count uses unique clicks |
mobile | android, ios, windowsMobile, redirect | Single+ | Set OS-based mobile redirect — parameter is case sensitive |
destination | URL-encoded destination | Single+ | Destination URL for mobile redirect — omit to remove |
unique | 1, 15-1440, 0 | Single+ | Unique click counting: 1 = 15 min window (Single), 15-1440 = custom window in minutes (Team), 0 = disable |
abtest | 0, 1, 2 | Single+ | A/B test: 0 = remove, 1 = A/B test, 2 = A/B/C test |
abtest_b | 0-100 | Single+ | Traffic percentage for B variation |
abtest_bvariation | URL for B variation | Single+ | Destination URL for B variation |
abtest_c | 0-100 | Single+ | Traffic percentage for C variation — B + C cannot exceed 100 |
abtest_cvariation | URL for C variation | Single+ | Destination URL for C variation |
Edit Response Status Codes
| Status | Meaning |
|---|---|
1 | OK — edit successful |
2 | Could not save to database |
3 | The URL does not exist or you do not own it |
4 | URL 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
| Parameter | Value | Required | Description |
|---|---|---|---|
key | Team API key | Yes | Authenticates the request |
action | shorten | Yes | Required action parameter — must be set to shorten |
url | URL-encoded destination | Yes | The URL to shorten — pass through urlencode() |
name | desired slug | Optional | Custom alias for the short link |
domain | yourbrnd.link | Optional | Branded domain to use — must be owned by the team |
noTitle | 1 | Optional | Faster response — skips page title fetch (Team Enterprise) |
public | 1 | Optional | Set 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
Cuttly supports TRAI-compliant SMS link shortening via both APIs. TRAI (Telecom Regulatory Authority of India) regulations require that SMS messages from businesses include a registered Header (sender ID) in the shortened URL format. Cuttly supports this via the 2s.ms domain and via custom branded domains with Headers.
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
| Plan | Rate limit | Links / month |
|---|---|---|
| Free | 3 requests / 60 seconds | 30 |
| Starter ($12/mo) | 6 requests / 60 seconds | 300 |
| Single ($25/mo) | 60 requests / 60 seconds | 5,000 |
| Team ($99/mo) | 180 requests / 60 seconds | 20,000 |
| Team Enterprise ($149/mo) | 360 requests / 60 seconds | 50,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
| Error | Cause and resolution |
|---|---|
401 Unauthorized / auth:false | API key is incorrect. Verify the key in Edit Account. |
Subscription has expired or you've reached your shortening limit | Upgrade your plan or wait for monthly reset. |
You do not own provided domain | The domain specified with userDomain=1 is not connected to your account. |
You do not own any domain | You used userDomain=1 but have no branded domain connected. |
Too many requests | Rate limit exceeded — implement retry with backoff. |
Insufficient subscription level | The edit parameter used requires a higher plan. |
Unique time must be between 15-1440 minutes | The unique parameter value is outside the allowed range. |
Provided alias is unavailable | The name parameter value is already taken — choose a different alias. |
Team API Errors
| Error | Cause and resolution |
|---|---|
400 Incorrect action | The action parameter is missing or contains an invalid value. |
400 Url parameter is null | The url parameter was not included in the request. |
401 Unauthorized | Team API key is incorrect. |
401 Subscription has expired | The team owner's subscription has expired. |
401 This domain is not owned by the team | The specified domain is not added to the team by the team owner. |
409 Provided link is already shortened | The destination URL's domain is a registered Cuttly custom domain. |
409 Provided link is incorrect | The URL is not a valid link. |
409 Provided alias contains illegal characters | The 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.statusbefore usingurl.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()orencodeURIComponent()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 requestserrors. - Store returned short links. The API does not provide a "list all links" endpoint — store the
url.shortLinkvalue returned at creation time in your own database for later editing or stats retrieval. - Team API: always include
action. Missing theactionparameter in a Team API request returns400 Incorrect action— the most common Team API mistake.
No-Code Alternatives to the API
If you need to automate Cuttly link creation without writing code, Cuttly integrates with major no-code and low-code automation platforms. See the full integrations page for setup guides.
| Platform | Best for | Code required |
|---|---|---|
| Zapier | Connecting Cuttly with 7,000+ apps visually | No |
| Make | Visual automation scenarios with complex logic | No |
| Boost.space | Enterprise data synchronization pipelines | No |
| Pipedream | Event-driven workflows for developers | Low-code |
| Laravel package | PHP/Laravel applications | Yes — PHP |
| NuGet package | .NET/C# applications | Yes — 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.
Full API documentation at cutt.ly/cuttly-api · See all plans and pricing
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.
- ← All Cuttly Tools
- URL Shortener
- Branded Domains
- Link Analytics
- Campaigns
- Surveys
- Link in Bio
- QR Codes
- TRAI URL Shortener
- API Documentation
- Full API Docs →
- Regular API Reference
- Team API Reference
- Integrations
- All Integrations →
- Zapier →
- Make →
- Pipedream →
- Related
- Plans & Pricing
- Create Free Account
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.