new: every yearly plan now includes a free .link domain

LEARN MORE

  • new: every yearly plan now includes a free .link domain

  • LEARN MORE

API

Programmatic link management for links and QR codes

Create, edit and delete links from your code or no-code tools, and see every click in one dashboard.

ShortPen API for links and QR codes
ShortPen
Marketing Team
Cool Agency LLC
Dashboard
My Links
Links
QR Codes
Analytics
Events
Collections
Folders
Tags
Templates
Help
Support
Suggest features
Settings
ML
Mark L.
mark@acme.com
Links
Easily manage your links. Search, filter, and monitor performance to optimize your results.
Import
New link
Search
Filters
Sort by newest
Order 10482, shipping updateโ€ข 20 Oct 2026
shr.pn/ord-10482
copy
https://acme.com/orders/10482/tracking
api
sms
3
Referral invite 2291โ€ข 20 Oct 2026
shr.pn/ref-2291
copy
https://acme.com/invite?ref=2291
api
12
Webinar reminder, Octoberโ€ข 18 Oct 2026
shr.pn/webinar-oct
copy
https://acme.com/webinar/october
sms
248
Trail Runner product pageโ€ข 14 Oct 2026
shr.pn/trail-runner
copy
https://acme.com/products/trail-runner
zapier
1,036
Spring catalog, printโ€ข 9 Oct 2026
shr.pn/catalog-qr
copy
https://acme.com/catalog/spring
412
Partner page, Northstarโ€ข 6 Oct 2026
shr.pn/northstar
copy
https://acme.com/partners/northstar
187
Black Friday teaserโ€ข 2 Oct 2026
shr.pn/bf-teaser
copy
https://acme.com/black-friday
zapier
96
Spring sale, newsletterโ€ข 20 Oct 2026
shr.pn/spring-sale
copy
https://acme.com/spring-sale?utm_source=newsletter
api
0
POST
https://api.shortpen.com/v1/generate
cURL
curl -X POST https://api.shortpen.com/v1/generate \
-H "Authorization: Bearer $SHORTPEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://acme.com/spring-sale",
"domain_id": 1,
"custom_slug": "spring-sale",
"title": "Spring sale, newsletter",
"generate_qr": true,
"tag_ids": [12],
"param": { "utm_source": "newsletter" }
}'
200
"link": "https://shr.pn/spring-sale", "qr": "iVBORw0KG...", "created": true

From API key to live links in three steps

Step 1: create a ShortPen API key
ShortPen
API keys
Your generated key is:
k7Qm2vX9pL4sWd8nE3bYh6TzRa1
Copy
For security reasons this key will not be shown again.
API access on every plan, free included

1. Get an API key

1. Get an API key

Create a key in a few seconds. Every plan includes API access, the free plan too.

Step 2: create links from your code or tools
New link
POST/v1/generate
{ "url": "https://acme.com/spring-sale" }
200"link": "https://shr.pn/spring-sale"
or use an automation tool
Zapier
Make
+15 tools

2. Create links from your code or your tools

2. Create links from your code or your tools

Send one request per link, or use Zapier, Make or another automation tool. Each link can come back with its QR code.

Step 3: track and manage links in ShortPen
Spring sale, newsletter
shr.pn/spring-sale
api
Clicks
1,248โ†— 12%
QR Scans
312โ†— 8%
Pull clicks into your tools
POST /v1/analytics

3. Track and manage them

3. Track and manage them

Every link lands in your workspace with its clicks and scans. Edit and tag it there, or pull the data back out.

Create links and QR codes from your code

One request returns the short link and its QR code, ready to send.

Create a branded link on your domain with a custom slug, UTMs, tags and a folder

Get the QR code back in the same response, in your brand colors and with your logo

Turn on conversion tracking, a password or a custom social preview for each link

Check what's left of your plan with one call before a large job

Creating links and QR codes with the ShortPen API
POST/v1/generate
Request body
{
"url": "https://acme.com/spring-sale",
"domain_id": 1,
"custom_slug": "spring-sale",
"folder_id": 7,
"tag_ids": [12],
"param": {
"utm_source": "newsletter",
"utm_medium": "email"
},
"generate_qr": true,
"r": 42, "g": 81, "b": 66,
"uploaded_logo_type": "custom",
"enable_tracking": true,
"pixel_id": 4
}
Link created200 OK
PNG in your brand colors
Link
shr.pn/spring-sale
copy
Folder and tag
Spring launchapi
Tracking
Conversion tracking on
POST/v1/me
API calls this month37 of 200 (Free plan)
"remaining": 163
Bulk editing links with the ShortPen API
Edit selected
Move to folder
Delete selected
3 links selected
Cancel
Spring catalog, printโ€ข 9 Oct 2026
shr.pn/catalog-qrcopy
https://acme.com/catalog/summer?utm_campaign=summer-catalog
412
Store window posterโ€ข 9 Oct 2026
shr.pn/window-postercopy
https://acme.com/spring-sale
286
Trade show flyerโ€ข 8 Oct 2026
shr.pn/expo-flyercopy
https://acme.com/spring-sale
153
Trail Runner product pageโ€ข 14 Oct 2026
shr.pn/trail-runnercopy
https://acme.com/products/trail-runner
1,036
Partner page, Northstarโ€ข 6 Oct 2026
shr.pn/northstarcopy
https://acme.com/partners/northstar
187
PUT/v1/links
Only what changes
{
"url_id": 512,
"url": "https://acme.com/catalog/summer",
"param": { "utm_campaign": "summer-catalog" }
}
200"link": "https://shr.pn/catalog-qr", "created": false

Edit and clean up links at scale

Change a link after it's shared or printed, from your code or from the dashboard.

Change a destination, slug or UTMs by sending only the fields that change

Delete many links in one request. Their analytics stay, and you can restore them from the dashboard.

Edit destinations, branded URLs or titles for many links at once in the dashboard

Create links from a CSV file, and export every link in a workspace to CSV

Pull click data into your own systems

Every click is a row you can load into your warehouse, BI tool or CRM.

Export raw clicks for any date range, for a workspace or a single link

Read the device, platform, browser, country and referrer of each click

Join on link ID, slug and domain to match clicks with your own records

List every link with its settings, 100 per page, to keep your systems in sync

Pulling ShortPen click data into your systems
POST/v1/analytics
Request body
{
"workspace_id": 24,
"start": "2026-10-01",
"end": "2026-10-20"
}
GET/v1/links?page=1&limit=100
{
"count": 100,
"total": 3604,
"page": 1
}
Response200 OKOne row per click
created_aturl_idurl_slugdevice_typeplatformbrowsercountryreferrer
2026-10-20 09:42523ref-2291mobileiOSSafariUShttps://mail.example.com
2026-10-20 09:40502ord-10482desktopWindowsChromeDE(none)
2026-10-20 09:37523ref-2291mobileAndroidChromeIThttps://social.example.com
2026-10-20 09:31517webinar-octmobileiOSSafariGB(none)
2026-10-20 09:26508trail-runnerdesktopmacOSSafariUShttps://news.example.com
2026-10-20 09:19512catalog-qrmobileiOSSafariFR(none)
2026-10-20 09:12508trail-runnertabletiPadOSSafariCAhttps://search.example.com
2026-10-20 09:05517webinar-octdesktopWindowsEdgeUS(none)
Automating ShortPen links without code
1. Trigger
New row in your spreadsheet
TitleDestination URLSlug
Spring catalog, printhttps://acme.com/catalog/springcatalog-qr
Summer pop-up flyerhttps://acme.com/summer-popuppopup-flyer
2. Action ยท ShortPen
Shorten URL
Very long URL
Destination URL
Title
Title
Custom slug
Slug
Domain ID
go.acme.com
Generate QR
Yes#2A5142
3. Result
Link created
Done
Summer pop-up flyer
go.acme.com/popup-flyer
https://acme.com/summer-popup
Same step in Zapier, Make, and other automation tools

Automate links without writing code

The marketing team builds the flow, and ShortPen creates the links.

Create a link for every new spreadsheet row or form submission with Zapier

Generate a QR code in your brand colors in the same step

Build multi-step scenarios in Make, with a generic API call for anything else

Use your custom domain in every automation

Robert Tabet, Co-Founder and CRO at Tapin
"ShortPen is now a core part of our infrastructure for link and QR-driven campaigns. Itโ€™s fast, extremely reliable, and gives us the visibility we need to understand what truly drives performance. It allows us to move faster, adapt instantly, and operate with confidence at scale."

"ShortPen is now a core part of our infrastructure for link and QR-driven campaigns. Itโ€™s fast, extremely reliable, and gives us the visibility we need to understand what truly drives performance. It allows us to move faster, adapt instantly, and operate with confidence at scale."

Robert Tabet, Co-Founder & CRO at Tapin

Robert Tabet, Co-Founder & CRO at Tapin

Stop building and babysitting your own links

Create links from code and no-code tools

Branded links on your own domain

QR code returned with each link

Edit a link after it's shared or printed

Click data per link, exportable as raw rows

Conversions on the same link

Marketers manage links without engineering

Who keeps it running

Time to first link

ShortPen

Minutes

Building your own shortener

Code only

Extra work

If you build it

If you build and store it

Separate build

Your engineers

Days to weeks

Manual link creation

Depends on the tool

Separate step

Partial

Your team, by hand

Minutes per link

Create links from code and no-code tools

Branded links on your own domain

QR code returned with each link

Edit a link after it's shared or printed

Click data per link, exportable as raw rows

Conversions on the same link

Marketers manage links without engineering

Who keeps it running

Time to first link

ShortPen

Minutes

Building your own shortener

Code only

Extra work

If you build it

If you build and store it

Separate build

Your engineers

Days to weeks

Manual link creation

Depends on the tool

Separate step

Partial

Your team, by hand

Minutes per link

Create links from code and no-code tools

Branded links on your own domain

QR code returned with each link

Edit a link after it's shared or printed

Click data per link, exportable as raw rows

Conversions on the same link

Marketers manage links without engineering

Who keeps it running

Time to first link

ShortPen

Minutes

Building your own shortener

Code only

Extra work

If you build it

If you build and store it

Separate build

Your engineers

Days to weeks

Manual link creation

Depends on the tool

Separate step

Partial

Your team, by hand

Minutes per link

Swipe to compare all tracking methods

What people actually say

Don't take our word for it. These are real people who use ShortPen to manage links, track campaigns, and run QR codes across their business.

Clear limits, stated up front

Compare our plans

Free

Paid plans

API access

For testing only

API calls

200/month

Unlimited

Requests per minute, per API key

60

up to 3,000

Links and QR codes

Unlimited

Unlimited

Clicks and scans tracked

Unlimited

Unlimited

Analytics shown in the dashboard

Last 30 days

Full history

Compare our plans

Free

Paid plans

API access

For testing only

API calls

200/month

Unlimited

Requests per minute, per API key

60

up to 3,000

Links and QR codes

Unlimited

Unlimited

Clicks and scans tracked

Unlimited

Unlimited

Analytics shown in the dashboard

Last 30 days

Full history

Compare our plans

Free

Paid plans

API access

For testing only

API calls

200/month

Unlimited

Requests per minute, per API key

60

up to 3,000

Links and QR codes

Unlimited

Unlimited

Clicks and scans tracked

Unlimited

Unlimited

Analytics shown in the dashboard

Last 30 days

Full history

Every plan includes the API, so you can build and test on free before you pay

Every link you create also gets

See all the features

Every link you create also gets

See all the features

Questions about the ShortPen API

If something's stopping you from trying ShortPen, the answer is probably here

Is the API available on the free plan?

Yes. Every plan includes API access. The free plan includes 200 API calls a month, and paid plans have unlimited calls.

What are the rate limits?

What happens when I reach a limit?

How many links can I create through the API?

Do I need to code to use it?

Can I create QR codes through the API?

Can I edit or delete links through the API?

What analytics can I pull?

Can I use my own domain?

What data does ShortPen store?

Ready to make every click count?

Simplify your link management, gain valuable insights, and take control of your online presence. Your journey to better links starts here.