Skip to main content
POST
/
links
/
{type}
Create a new link(QR code)
curl --request POST \
  --url https://api.supaqr.com/links/{type} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "data": {
    "url": "https://example.com"
  },
  "linkOptions": {
    "domain": "iqr.im",
    "key": "<string>",
    "tags": [
      "tagId"
    ],
    "comment": "<string>",
    "password": "<string>",
    "expiration": {
      "time": "2025-12-31T23:59:59Z",
      "url": "https://example.com"
    },
    "utm": {
      "source": "google",
      "medium": "cpc",
      "campaign": "menu",
      "term": "pizza",
      "content": "menu QR code",
      "ref": "yoursite.com"
    },
    "option": {
      "isWaterMark": false,
      "watermarkText": "supaqr",
      "isScreenshotProtected": false
    },
    "previewData": {
      "title": "SupaQR",
      "desc": "Create Your Free Custom Dynamic QR Codes for link, images or PDF files",
      "image": "https://example.com/abc.png"
    },
    "Targeting": {
      "targetType": "device",
      "targetDatas": {
        "ios": "https://example.com",
        "android": "https://example.com"
      }
    }
  },
  "qrOptions": {
    "correctLevel": 2,
    "space": 2,
    "version": -1,
    "frame": {
      "type": "preset",
      "value": "https://file.supaqr.com/example.png",
      "options": {
        "code_rect": [
          100
        ]
      },
      "add_texts": [
        {
          "pos": [
            2
          ],
          "color": "#FFFFFF",
          "size": 100,
          "align": "start",
          "font": "Roboto",
          "content": "<string>",
          "prefix": "<string>"
        }
      ]
    },
    "patterns": {
      "background": {
        "type": "single",
        "value": "#000000"
      },
      "body": {
        "style_id": "Simple",
        "type": "single",
        "value": "#000000",
        "direction": "Horizontal"
      },
      "eye": {
        "style_id": "1",
        "type": "same",
        "value": "#000000",
        "direction": "Horizontal"
      }
    },
    "logo": {
      "type": "image",
      "value": "<string>",
      "location": "Center",
      "shape": "Squared",
      "size": 2,
      "hasBackground": true,
      "shadow": false
    }
  }
}'
{
  "id": "<string>",
  "domain": "iqr.im",
  "key": "<string>",
  "shortLink": "https://iqr.im/abc",
  "qrCode": "https://api.supaqr.com/qr/linkid",
  "linkType": "<string>",
  "destination": "<string>",
  "clicks": 123,
  "tags": [
    "tagId"
  ],
  "comments": "<string>",
  "hasPassword": true,
  "expiration": {
    "time": "2025-12-31T23:59:59Z",
    "url": "https://example.com"
  },
  "utm": {
    "source": "google",
    "medium": "cpc",
    "campaign": "menu",
    "term": "pizza",
    "content": "menu QR code",
    "ref": "yoursite.com"
  },
  "option": {
    "isWaterMark": false,
    "watermarkText": "supaqr",
    "isScreenshotProtected": false
  },
  "previewData": {
    "title": "SupaQR",
    "desc": "Create Your Free Custom Dynamic QR Codes for link, images or PDF files",
    "image": "https://example.com/abc.png"
  },
  "Targeting": {
    "targetType": "device",
    "targetDatas": {
      "ios": "https://example.com",
      "android": "https://example.com"
    }
  },
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "lastClicked": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

type
enum<string>
required
Available options:
link,
document,
file,
google-form,
menu,
app-stores,
image,
audio,
video,
wi-fi,
email,
map,
whatsapp,
text,
sms,
svg

Body

application/json
data
object
required

The data/link destination of the short URL or QR code.

qrOptions
object

Response

id
string
required

The ID of the link(QR code)

domain
string
required

Specifies the domain to use for generating short links or QR codes.

Default domains: iqr.im or spqr.co

You may also use your own custom domain (must be properly configured)

Required string length: 3 - 253
Example:

"iqr.im"

key
string
required

The short link slug. If not provided, a random 7-character slug will be generated

Required string length: 1 - 190

The full URL of the short link

Example:

"https://iqr.im/abc"

qrCode
string
required

The full URL of the QR code for the short link.

Example:

"https://api.supaqr.com/qr/linkid"

destination
string
required
clicks
number
required

The number of clicks or scans on the short link (QR code).

hasPassword
boolean
required
createdAt
string
required

The date and time when the short link(QR code) was created.

updatedAt
string
required

The date and time when the short link(QR code) was last updated.

lastClicked
string | null
required

The date and time when the short link was last clicked or QR code was scanned.

tags
string[] | null

The unique IDs of the tags assigned to the short link or QR code.

Maximum length: 30
comments
string | null

The comments for the short link or QR code.

Maximum length: 2000
expiration
object | null

Defines when the link expires. After expiration, users will be redirected to a specified fallback URL.

utm
object | null

Used to track marketing campaign metrics (e.g., source, medium, campaign name) in analytics tools

option
object | null

Content Protection Options

previewData
object | null

Will be used for Custom Social Media Cards

Targeting
object | null

Defines conditional routing rules for different target URLs based on visitor attributes (device, location, etc.)

I