Skip to content

Short Link Create API

Create a short link from your own backend instead of the dashboard: one request per link, with per-platform targets, your own slug, and optional pixel tracking.

Endpoint

POST https://api.shrinkit.me/apps/{project_id}/smartlinks
Header Value
appApiKey Your store's API key
content-type application/json

{project_id} is your Store ID. Both values come from Store settings → API Key — see REST API.

Required parameters

Parameter Type Notes
name string 1–150 characters. The link's name in the dashboard.
description string 2–500 characters.
targates object Where the link sends visitors. Requires web, ios and android. Note the spelling — the field really is targates.
launch_page object Requires header, the text shown while the link resolves.

The targates object

Key Type Notes
web string Destination URL for desktop and unrecognised browsers. 5–500 characters.
ios object Requires primary; fallback is optional.
android object Requires primary; fallback is optional.

For ios and android, primary is the deep link opened when the app is installed, and fallback is where the visitor goes when it is not.

Optional parameters

Parameter Type Notes
slug string 2–50 characters. The path segment of the short link. Generated for you if omitted.
image string Preview image URL.
status string reserve, active or disable.
tags array Tags for filtering and reporting.
web_push_subscription boolean Ask for web push permission on the launch page. Defaults to false.
primary_text, primary_textcolor, primary_bgcolor string Launch-page primary button styling.
fallback_text, fallback_textcolor, fallback_bgcolor string Launch-page fallback button styling.

Retargeting pixels

Each network has a boolean switch (default false) and an ID field. Set both to fire that pixel when the link is opened.

Switch ID field
FBpixel_tracking FBpixel_tracking_code
twitter_pixel_tracking twitter_pixel_id
google_ads_pixel_tracking google_ads_id
linkedIn_pixel_tracking linkedIn_id
snapchat_pixel_tracking snapchat_id
tiktok_pixel_tracking tiktok_pixel_id

Request

curl --request POST \
  --url https://api.shrinkit.me/apps/574ad3de1ffdbfa835465e39/smartlinks \
  --header 'appApiKey: YOUR_API_KEY' \
  --header 'content-type: application/json' \
  --data '{
    "name": "test",
    "description": "test Facebook Browser",
    "slug": "TreMp",
    "image": "https://techcrunch.com/",
    "targates": {
      "web": "https://techcrunch.com/",
      "ios": {
        "primary": "http://techcrunch.com",
        "fallback": "https://techcrunch.com/"
      },
      "android": {
        "primary": "http://techcrunch.com",
        "fallback": "https://techcrunch.com/"
      }
    },
    "launch_page": {
      "header": "Please Wait..."
    }
  }'

Response

201 Created:

{
  "status": "success",
  "message": "successfully created",
  "smartlink": "https://yourstore.shrinkit.me/s/TreMp"
}

Errors

Code Example message Cause
400 this value is invalid, 't' is too short A field failed validation — the message names it
400 slug is invalid , choose another slug. The slug is on the reserved-names list
400 domain doesn't exist The domain given is not configured on this store
401 NotAuthorized appApiKey header missing or invalid
409 Conflict, slug not available. That slug is already in use
500 Server Error Server error — retry, then contact support

Install Shrinkit on your store

Shrinkit works with Salla, Zid and Shopify. Install the app on your store and your orders, carts, products and customers appear in the dashboard automatically — no coding, no data import.

Not on any of those platforms yet? Talk to us on WhatsApp.