Skip to main content
POST
https://api.linquid.io
/
links
Create Link
curl --request POST \
  --url https://api.linquid.io/links \
  --header 'Authorization: Bearer <token>'

Create Link

Create a new short link.

Request

curl -X POST https://api.linquid.io/links \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationUrl": "https://example.com/landing",
    "title": "My Link",
    "campaignId": "campaign_abc123"
  }'

Body Parameters

ParameterTypeRequiredDescription
destinationUrlstringYesTarget URL
campaignIdstringYesParent campaign ID
titlestringNoDisplay name
shortCodestringNoCustom short code
descriptionstringNoDescription
enabledbooleanNoActive status (default: true)
expiresAtstringNoISO 8601 expiration date
clicksLimitnumberNoMax clicks before expiry
passwordstringNoPassword protection

Deep Linking

ParameterTypeDescription
deepLinkEnabledbooleanEnable deep linking
deepLinkIosstringiOS deep link URL
deepLinkAndroidstringAndroid deep link URL
deepLinkFallbackUrlstringFallback when app not installed

Conversion Tracking

ParameterTypeDescription
conversionTrackingbooleanEnable conversion tracking
trackingTypestringpixel or s2s

Response

{
  "success": true,
  "data": {
    "id": "link_xyz789",
    "shortCode": "abc123",
    "shortUrl": "https://linqu.id/abc123",
    "destinationUrl": "https://example.com/landing",
    "title": "My Link",
    "campaignId": "campaign_abc123",
    "enabled": true,
    "clicks": 0,
    "uniqueClicks": 0,
    "createdAt": "2024-01-15T10:30:00Z"
  }
}

Examples

With Custom Short Code

curl -X POST https://api.linquid.io/links \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationUrl": "https://example.com",
    "shortCode": "summer-sale",
    "campaignId": "campaign_abc"
  }'

With Deep Linking

curl -X POST https://api.linquid.io/links \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationUrl": "https://example.com/product/123",
    "campaignId": "campaign_abc",
    "deepLinkEnabled": true,
    "deepLinkIos": "myapp://product/123",
    "deepLinkAndroid": "intent://product/123#Intent;scheme=myapp;end",
    "deepLinkFallbackUrl": "https://example.com/app-download"
  }'

With Conversion Tracking

curl -X POST https://api.linquid.io/links \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationUrl": "https://example.com/checkout",
    "campaignId": "campaign_abc",
    "conversionTracking": true,
    "trackingType": "s2s"
  }'

Errors

Short Code Taken

{
  "success": false,
  "error": {
    "code": "SHORT_CODE_EXISTS",
    "message": "Short code 'summer-sale' is already in use"
  }
}

Limit Exceeded

{
  "success": false,
  "error": {
    "code": "LIMIT_EXCEEDED",
    "message": "You have reached your plan's link limit (25)"
  }
}