Skip to content

Short Links API

Short links live in groups. A group is a campaign, an affiliate program, a newsletter: anything with a purpose. A link carries a destination, a short domain and a UTM set, and every click is recorded with geo, device and bot classification.

MethodPathScope
GET/v2/property/link-groupsshortlinks:read
POST/v2/property/link-groupsshortlinks:write
GET/v2/property/link-groups/{group}shortlinks:read
POST/v2/property/link-groups/{group}shortlinks:write
DELETE/v2/property/link-groups/{group}shortlinks:write
GET/v2/property/linksshortlinks:read
POST/v2/property/linksshortlinks:write
GET/v2/property/links/{link}shortlinks:read
POST/v2/property/links/{link}shortlinks:write
DELETE/v2/property/links/{link}shortlinks:write
GET/v2/property/clicksshortlinks:read
GET/v2/property/clicks/{click}shortlinks:read

Ids from another property return 404 (group not found in this property, link not found in this property, click not found in this property). Lists are paginated with page and per_page (1 to 100, default 25) and come back as a Laravel paginator spread at the root of data: data, current_page, last_page, per_page, total, next_page_url, prev_page_url, and so on.

FieldValues
purposecampaign (default), affiliate, newsletter, partner, social
state (group)active, archived
domainsnipl-it (serves snipl.it), tinysnip-link (serves tinysnip.link)
type (click)user, bot

Purposes differ only in the UTM defaults and hints the dashboard offers; the API stores whatever UTM you send.

Group shape: { id, name, description, purpose, state, track_clicks, count_links, count_clicks, created_at }. created_at is ISO 8601.

POST /v2/property/link-groups

FieldRules
namerequired, string, max 120
descriptionstring, max 500
purposeone of the purposes above
track_clicksboolean
Terminal window
curl -X POST https://api.snipform.io/v2/property/link-groups \
-H "Authorization: Bearer $SNIPFORM_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "name": "Spring affiliates", "purpose": "affiliate", "track_clicks": true }'
  • GET /v2/property/link-groups returns { "groups": [...] }, newest first.
  • GET /v2/property/link-groups/{group} returns { "group": {...} }.
  • POST /v2/property/link-groups/{group} accepts name (string, max 120), description (string, max 500), purpose, track_clicks (boolean), state (active or archived); all optional. Returns { "group": {...} }.
  • DELETE /v2/property/link-groups/{group} returns { "deleted": true }.

Link shape: { id, group_id, name, code, short_url, destination_url, domain, utm, is_active, clicks, created_ts }. created_ts is unix seconds; code is the path segment and short_url the full URL to share.

POST /v2/property/links

FieldRules
group_idrequired, an existing group in this property
destination_urlrequired, valid URL, max 2048
domainrequired, snipl-it or tinysnip-link
utm.utm_source, utm.utm_medium, utm.utm_campaign, utm.utm_term, utm.utm_contentstring, max 255 each
Terminal window
curl -X POST https://api.snipform.io/v2/property/links \
-H "Authorization: Bearer $SNIPFORM_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"group_id": "66c4f1a2b3c4d5e6f7a8b9c0",
"destination_url": "https://acme.com/spring",
"domain": "snipl-it",
"utm": { "utm_source": "affiliate_network", "utm_medium": "affiliate", "utm_campaign": "spring_sale", "utm_content": "pub_12345" }
}'

Use POST /v2/property/attribution/preview with the same UTM set to see how sessions arriving through the link will be classified before you share it. See Attribution API.

  • GET /v2/property/links?group_id=...&page=1&per_page=25 - group_id is optional; without it all links in the property, newest first.
  • GET /v2/property/links/{link} returns { "link": {...} }.
  • POST /v2/property/links/{link} accepts destination_url (URL, max 2048), domain, utm (same keys as create), is_active (boolean); all optional. Returns { "link": {...} }.
  • DELETE /v2/property/links/{link} returns { "deleted": true }.

Click shape:

{
"id": "66c4f3c4d5e6f7a8b9c0d1e2",
"short_link_id": "66c4f2b3c4d5e6f7a8b9c0d1",
"short_link_group_id": "66c4f1a2b3c4d5e6f7a8b9c0",
"click_ts": 1755783000,
"type": "user",
"referrer_domain": "t.co",
"referrer_url": "https://t.co/abc",
"country": "South Africa",
"country_code": "ZA",
"region": "Western Cape",
"city": "Cape Town",
"device": "mobile",
"browser": "Safari",
"os": "iOS",
"is_bot": false,
"bot_name": null
}

GET /v2/property/clicks

QueryRules
link_idstring
group_idstring
from_ts, to_tsinteger unix seconds, inclusive
typeuser or bot
page, per_pagepagination
Terminal window
curl "https://api.snipform.io/v2/property/clicks?group_id=66c4f1a2b3c4d5e6f7a8b9c0&type=user&from_ts=1755129600" \
-H "Authorization: Bearer $SNIPFORM_TOKEN"

GET /v2/property/clicks/{click} returns { "click": {...} }.