curl -X POST https://api.linquid.io/api/links \
-H "X-API-Key: lw_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"destinationUrl": "https://example.com/landing-page",
"title": "Summer Campaign Link",
"campaignId": "camp_xyz789",
"tags": ["summer", "promo"]
}'
const response = await fetch('https://api.linquid.io/api/links', {
method: 'POST',
headers: {
'X-API-Key': 'lw_your_api_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
destinationUrl: 'https://example.com/landing-page',
title: 'Summer Campaign Link',
campaignId: 'camp_xyz789',
tags: ['summer', 'promo'],
}),
});
const { data } = await response.json();
console.log('Created link:', data.shortUrl);
import requests
response = requests.post(
'https://api.linquid.io/api/links',
headers={
'X-API-Key': 'lw_your_api_key_here',
'Content-Type': 'application/json',
},
json={
'destinationUrl': 'https://example.com/landing-page',
'title': 'Summer Campaign Link',
'campaignId': 'camp_xyz789',
'tags': ['summer', 'promo'],
}
)
data = response.json()['data']
print(f"Created link: {data['shortUrl']}")
{
"success": true,
"data": {
"id": "link_abc123",
"shortCode": "abc123",
"shortUrl": "https://linqu.id/abc123",
"destinationUrl": "https://example.com/landing-page",
"title": "Summer Campaign Link",
"campaignId": "camp_xyz789",
"enabled": true,
"passwordProtected": false,
"expiresAt": null,
"clicksLimit": null,
"tags": ["summer", "promo"],
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
}
Links and Rules
Create Link
Create a new smart link
POST
/
api
/
links
curl -X POST https://api.linquid.io/api/links \
-H "X-API-Key: lw_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"destinationUrl": "https://example.com/landing-page",
"title": "Summer Campaign Link",
"campaignId": "camp_xyz789",
"tags": ["summer", "promo"]
}'
const response = await fetch('https://api.linquid.io/api/links', {
method: 'POST',
headers: {
'X-API-Key': 'lw_your_api_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
destinationUrl: 'https://example.com/landing-page',
title: 'Summer Campaign Link',
campaignId: 'camp_xyz789',
tags: ['summer', 'promo'],
}),
});
const { data } = await response.json();
console.log('Created link:', data.shortUrl);
import requests
response = requests.post(
'https://api.linquid.io/api/links',
headers={
'X-API-Key': 'lw_your_api_key_here',
'Content-Type': 'application/json',
},
json={
'destinationUrl': 'https://example.com/landing-page',
'title': 'Summer Campaign Link',
'campaignId': 'camp_xyz789',
'tags': ['summer', 'promo'],
}
)
data = response.json()['data']
print(f"Created link: {data['shortUrl']}")
{
"success": true,
"data": {
"id": "link_abc123",
"shortCode": "abc123",
"shortUrl": "https://linqu.id/abc123",
"destinationUrl": "https://example.com/landing-page",
"title": "Summer Campaign Link",
"campaignId": "camp_xyz789",
"enabled": true,
"passwordProtected": false,
"expiresAt": null,
"clicksLimit": null,
"tags": ["summer", "promo"],
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
}
Request Body
The target URL to redirect to
Display name for the link
Custom short code (auto-generated if not provided)
Campaign to associate this link with
Custom domain to use (defaults to linqu.id)
ISO 8601 datetime when link expires
Maximum number of clicks allowed
Password to protect the link
Array of tag strings for organization
Response
Whether the request was successful
The created link object
curl -X POST https://api.linquid.io/api/links \
-H "X-API-Key: lw_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"destinationUrl": "https://example.com/landing-page",
"title": "Summer Campaign Link",
"campaignId": "camp_xyz789",
"tags": ["summer", "promo"]
}'
const response = await fetch('https://api.linquid.io/api/links', {
method: 'POST',
headers: {
'X-API-Key': 'lw_your_api_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
destinationUrl: 'https://example.com/landing-page',
title: 'Summer Campaign Link',
campaignId: 'camp_xyz789',
tags: ['summer', 'promo'],
}),
});
const { data } = await response.json();
console.log('Created link:', data.shortUrl);
import requests
response = requests.post(
'https://api.linquid.io/api/links',
headers={
'X-API-Key': 'lw_your_api_key_here',
'Content-Type': 'application/json',
},
json={
'destinationUrl': 'https://example.com/landing-page',
'title': 'Summer Campaign Link',
'campaignId': 'camp_xyz789',
'tags': ['summer', 'promo'],
}
)
data = response.json()['data']
print(f"Created link: {data['shortUrl']}")
{
"success": true,
"data": {
"id": "link_abc123",
"shortCode": "abc123",
"shortUrl": "https://linqu.id/abc123",
"destinationUrl": "https://example.com/landing-page",
"title": "Summer Campaign Link",
"campaignId": "camp_xyz789",
"enabled": true,
"passwordProtected": false,
"expiresAt": null,
"clicksLimit": null,
"tags": ["summer", "promo"],
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
}
Error Responses
Invalid URL
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid destination URL format"
}
}
Short Code Taken
{
"success": false,
"error": {
"code": "SHORT_CODE_EXISTS",
"message": "This short code is already in use"
}
}
Insufficient Credits
{
"success": false,
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Workspace has insufficient credits"
}
}
Was this page helpful?
⌘I

