Introduction
Shortlink service allows you to create redirections based on conditions.
This documentation aims to provide all the information you need to work with our API.
Base URL
http://links.lim.bzAuthenticating requests
This API is authenticated by sending an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by sending POST request with client_id and client_secret to /oauth/token.
Issue Token
Example request:
curl -X POST \
"links.lim.bz/oauth/token" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"grant_type":"client_credentials","client_id":1,"client_secret":"XXXXXXXXXXXXXXXXXXXXXXXXXXX","scope":"*"}'
const url = new URL(
"links.lim.bz/oauth/token"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"grant_type": "client_credentials",
"client_id": 1,
"client_secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
"scope": "*"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'links.lim.bz/oauth/token',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'grant_type' => 'client_credentials',
'client_id' => 1,
'client_secret' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXX',
'scope' => '*',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"token_type": "Bearer",
"expires_in": 1,
"access_token": "token"
}
Received response:
Request failed with error:
Application
Get application info.
requires authentication
Get current authenticated application info.
Example request:
curl -X GET \
-G "http://links.lim.bz/api/app" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/app"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/app',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"client": "Example Application",
"access_token": "eyXXXXXXXX.XXXXXXX.XXXX",
"expires_at": "2031-02-07T12:47:58.000000Z",
"scopes": [
"*"
]
}
Received response:
Request failed with error:
Update application settings.
requires authentication
You can update your webhook listener url or email. Signals to your system will be sent via one of three ways: POST, GET or EMAIL.
Every event like shortlink has been entered or end user has been redirected may send signal to your system or application.
Example request:
curl -X PUT \
"http://links.lim.bz/api/app/settings" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"listener_uri":"https:\/\/yourdomain.com\/listener.php","email":"signals@yourdomain.com"}'
const url = new URL(
"http://links.lim.bz/api/app/settings"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"listener_uri": "https:\/\/yourdomain.com\/listener.php",
"email": "signals@yourdomain.com"
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
'http://links.lim.bz/api/app/settings',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'listener_uri' => 'https://yourdomain.com/listener.php',
'email' => 'signals@yourdomain.com',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Conditions
Add condition to Signal.
requires authentication
You can create new condition for Signal. Remember signal will be send if end user satisfies all conditions.
Example request:
curl -X POST \
"http://links.lim.bz/api/shortlinks/20/signals/20/conditions" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/20/signals/20/conditions"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/shortlinks/20/signals/20/conditions',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"first_time": "2021-04-26T00:00:00.000000Z",
"second_time": null,
"operator": "LESS THAN",
"created_at": "2021-03-16T11:22:16.000000Z",
"updated_at": "2021-03-16T11:22:16.000000Z"
}
}
Received response:
Request failed with error:
Add condition to Interstitial.
requires authentication
You can create new condition for Interstitial. Remember end user needs to satisfy all conditions to show interstitial.
Example request:
curl -X POST \
"http://links.lim.bz/api/shortlinks/14/interstitials/11/conditions" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/14/interstitials/11/conditions"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/shortlinks/14/interstitials/11/conditions',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"first_time": "2021-04-26T00:00:00.000000Z",
"second_time": null,
"operator": "LESS THAN",
"created_at": "2021-03-16T11:22:16.000000Z",
"updated_at": "2021-03-16T11:22:16.000000Z"
}
}
Received response:
Request failed with error:
Add condition to Destination.
requires authentication
You can create new condition for Destination. Remember that end user will be redirected to destination if end user satisfies all conditions.
Example request:
curl -X POST \
"http://links.lim.bz/api/shortlinks/9/destinations/11/conditions" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/9/destinations/11/conditions"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/shortlinks/9/destinations/11/conditions',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"first_time": "2021-04-26T00:00:00.000000Z",
"second_time": null,
"operator": "LESS THAN",
"created_at": "2021-03-16T11:22:16.000000Z",
"updated_at": "2021-03-16T11:22:16.000000Z"
}
}
Received response:
Request failed with error:
Remove condition from Signal.
requires authentication
You can remove existing condition from Signal. Remember end user needs to satisfy all conditions to send signal.
Example request:
curl -X DELETE \
"http://links.lim.bz/api/shortlinks/15/signals/7/conditions/12" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/15/signals/7/conditions/12"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://links.lim.bz/api/shortlinks/15/signals/7/conditions/12',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{[]}
Received response:
Request failed with error:
Remove condition from Interstitial.
requires authentication
You can remove existing condition from Interstitial. Remember end user needs to satisfy all conditions to show interstitial.
Example request:
curl -X DELETE \
"http://links.lim.bz/api/shortlinks/5/interstitials/17/conditions/5" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/5/interstitials/17/conditions/5"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://links.lim.bz/api/shortlinks/5/interstitials/17/conditions/5',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{[]}
Received response:
Request failed with error:
Remove condition from Destination.
requires authentication
You can remove existing condition from Signal. Remember end user needs to satisfy all conditions to be redirected to destination.
Example request:
curl -X DELETE \
"http://links.lim.bz/api/shortlinks/7/destinations/1/conditions/11" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/7/destinations/1/conditions/11"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://links.lim.bz/api/shortlinks/7/destinations/1/conditions/11',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{[]}
Received response:
Request failed with error:
Destinations
Get shortlink all destinations.
requires authentication
Get list of all destinations for certain shortlink
Example request:
curl -X GET \
-G "http://links.lim.bz/api/shortlinks/13/destinations" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/13/destinations"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/shortlinks/13/destinations',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": 1,
"uri": "https:\/\/ct.winlocal.io\/bedford",
"is_default": 1,
"conditions": []
},
{
"id": 1,
"uri": "https:\/\/ct.winlocal.io\/bedford",
"is_default": 1,
"conditions": []
}
]
}
Received response:
Request failed with error:
Create Destination for shortlink.
requires authentication
You can create new Destination for existing shortlink.
Example request:
curl -X POST \
"http://links.lim.bz/api/shortlinks/9/destinations" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"__asterisk__":{"uri":"http:\/\/www.kessler.biz\/rerum-voluptate-fugiat-est-ea.html","conditions":[{"type":"CONTINENT"}],"is_default":"1"},"is_default":true,"conditions":[{"first_date":"minus","second_date":"pariatur","first_time":"et","second_time":"veniam","continent_code":"quae","continent":"consequatur","country_code":"eaque","country":"in","region_code":"et","region":"ut","latitude":"officiis","longitude":"quaerat","range":6,"temperature":17,"weather":"non"},{"first_date":"minus","first_time":"et","country_code":"eaque","region_code":"et","region":"ut","latitude":"officiis","temperature":17}]}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/9/destinations"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"__asterisk__": {
"uri": "http:\/\/www.kessler.biz\/rerum-voluptate-fugiat-est-ea.html",
"conditions": [
{
"type": "CONTINENT"
}
],
"is_default": "1"
},
"is_default": true,
"conditions": [
{
"first_date": "minus",
"second_date": "pariatur",
"first_time": "et",
"second_time": "veniam",
"continent_code": "quae",
"continent": "consequatur",
"country_code": "eaque",
"country": "in",
"region_code": "et",
"region": "ut",
"latitude": "officiis",
"longitude": "quaerat",
"range": 6,
"temperature": 17,
"weather": "non"
},
{
"first_date": "minus",
"first_time": "et",
"country_code": "eaque",
"region_code": "et",
"region": "ut",
"latitude": "officiis",
"temperature": 17
}
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/shortlinks/9/destinations',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'__asterisk__' => [
'uri' => 'http://www.kessler.biz/rerum-voluptate-fugiat-est-ea.html',
'conditions' => [
[
'type' => 'CONTINENT',
],
],
'is_default' => '1',
],
'is_default' => true,
'conditions' => [
[
'first_date' => 'minus',
'second_date' => 'pariatur',
'first_time' => 'et',
'second_time' => 'veniam',
'continent_code' => 'quae',
'continent' => 'consequatur',
'country_code' => 'eaque',
'country' => 'in',
'region_code' => 'et',
'region' => 'ut',
'latitude' => 'officiis',
'longitude' => 'quaerat',
'range' => 6,
'temperature' => 17,
'weather' => 'non',
],
[
'first_date' => 'minus',
'first_time' => 'et',
'country_code' => 'eaque',
'region_code' => 'et',
'region' => 'ut',
'latitude' => 'officiis',
'temperature' => 17,
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"uri": "https:\/\/ct.winlocal.io\/bedford",
"is_default": 1,
"conditions": []
}
}
Received response:
Request failed with error:
Update Destination for shortlink.
requires authentication
You can update existing destination.
Example request:
curl -X PUT \
"http://links.lim.bz/api/shortlinks/10/destinations/7" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"uri":"http:\/\/emmerich.com\/","is_default":true}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/10/destinations/7"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"uri": "http:\/\/emmerich.com\/",
"is_default": true
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
'http://links.lim.bz/api/shortlinks/10/destinations/7',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'uri' => 'http://emmerich.com/',
'is_default' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"uri": "https:\/\/ct.winlocal.io\/bedford",
"is_default": 1,
"conditions": []
}
}
Received response:
Request failed with error:
Delete Destination for shortlink.
requires authentication
You can delete existing Destination. This action can not be undone!
Example request:
curl -X DELETE \
"http://links.lim.bz/api/shortlinks/13/destinations/15" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/13/destinations/15"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://links.lim.bz/api/shortlinks/13/destinations/15',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Domains
Create domain.
requires authentication
Create domain. You need to be owner of provided domain. Please redirect domain records for
Example request:
curl -X POST \
"http://links.lim.bz/api/domains" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"domain":"et","is_default":false}'
const url = new URL(
"http://links.lim.bz/api/domains"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"domain": "et",
"is_default": false
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/domains',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'domain' => 'et',
'is_default' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"domain": "linkto.us",
"created_at": "2020-11-23T15:58:34.000000Z"
}
}
Received response:
Request failed with error:
Get all domains
requires authentication
Returns all domains assigned to application.
Example request:
curl -X GET \
-G "http://links.lim.bz/api/domains" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/domains"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/domains',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": 1,
"domain": "linkto.us",
"created_at": "2020-11-23T15:58:34.000000Z"
},
{
"id": 1,
"domain": "linkto.us",
"created_at": "2020-11-23T15:58:34.000000Z"
}
]
}
Received response:
Request failed with error:
Get single domain
requires authentication
Returns single domain info.
Example request:
curl -X GET \
-G "http://links.lim.bz/api/domains/1" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/domains/1"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/domains/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"domain": "linkto.us",
"created_at": "2020-11-23T15:58:34.000000Z"
}
}
Received response:
Request failed with error:
Create subdomain for domain.
requires authentication
Creates subdomain for your domain. "Empty" subdomain for each domain is created automatically which is default.
Example request:
curl -X POST \
"http://links.lim.bz/api/domains/1/subdomains" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"subdomain":"ut","$subdomain":"links","$is_default":false}'
const url = new URL(
"http://links.lim.bz/api/domains/1/subdomains"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"subdomain": "ut",
"$subdomain": "links",
"$is_default": false
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/domains/1/subdomains',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'subdomain' => 'ut',
'$subdomain' => 'links',
'$is_default' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Facebook Pixel Tracks
Get shortlink all Pixel Track actions.
requires authentication
Get list of all Pixel Track actions for certain shortlink
Example request:
curl -X GET \
-G "http://links.lim.bz/api/shortlinks/1/pixeltracks" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/1/pixeltracks"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/shortlinks/1/pixeltracks',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": 1,
"action": "ViewContent",
"attributes": [
{
"key": "page_type",
"value": "mbc"
},
{
"key": "business_id",
"value": 66
},
{
"key": "company_name",
"value": "Kruszewski Group"
},
{
"key": "mbc_id",
"value": 131
},
{
"key": "user_id",
"value": 178
},
{
"key": "mbc_theme_id",
"value": 22
}
]
},
{
"id": 1,
"action": "ViewContent",
"attributes": [
{
"key": "page_type",
"value": "mbc"
},
{
"key": "business_id",
"value": 66
},
{
"key": "company_name",
"value": "Kruszewski Group"
},
{
"key": "mbc_id",
"value": 131
},
{
"key": "user_id",
"value": 178
},
{
"key": "mbc_theme_id",
"value": 22
}
]
}
]
}
Received response:
Request failed with error:
Create Facebook Pixel track action for existing shortlink
requires authentication
You can create new Facebook Pixel action for existing shortlink.
Example request:
curl -X POST \
"http://links.lim.bz/api/shortlinks/1/pixeltracks" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"action":"viewContent","attributes":[{"key":"quae","value":"et"}]}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/1/pixeltracks"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"action": "viewContent",
"attributes": [
{
"key": "quae",
"value": "et"
}
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/shortlinks/1/pixeltracks',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'action' => 'viewContent',
'attributes' => [
[
'key' => 'quae',
'value' => 'et',
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"action": "ViewContent",
"attributes": [
{
"key": "page_type",
"value": "mbc"
},
{
"key": "business_id",
"value": 66
},
{
"key": "company_name",
"value": "Kruszewski Group"
},
{
"key": "mbc_id",
"value": 131
},
{
"key": "user_id",
"value": 178
},
{
"key": "mbc_theme_id",
"value": 22
}
]
}
}
Received response:
Request failed with error:
Delete Pixel Track action for shortlink.
requires authentication
You can delete existing Pixel Track action. This action can not be undone!
Example request:
curl -X DELETE \
"http://links.lim.bz/api/shortlinks/18/pixeltracks/12" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/18/pixeltracks/12"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://links.lim.bz/api/shortlinks/18/pixeltracks/12',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{[]}
Received response:
Request failed with error:
Heads
Get shortlink all tags.
requires authentication
Get list of all heads tags for certain shortlink
Example request:
curl -X GET \
-G "http://links.lim.bz/api/shortlinks/1/heads" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/1/heads"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/shortlinks/1/heads',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": 1,
"head": "<link rel=\"apple-touch-icon\" href=\"https:\/\/sharelocal-mbc.s3.us-east-2.amazonaws.com\/upload\/user\/users\/fb846b23-2032-4988-8621-ae750656dcac\/SQ5QULArNNiq2iUi.png\" \\\/>",
"created_at": "2021-08-03T08:14:23.000000Z"
},
{
"id": 1,
"head": "<link rel=\"apple-touch-icon\" href=\"https:\/\/sharelocal-mbc.s3.us-east-2.amazonaws.com\/upload\/user\/users\/fb846b23-2032-4988-8621-ae750656dcac\/SQ5QULArNNiq2iUi.png\" \\\/>",
"created_at": "2021-08-03T08:14:23.000000Z"
}
]
}
Received response:
Request failed with error:
Create Head section.
requires authentication
You can create any tag which will be placed between ....
Example request:
curl -X POST \
"http://links.lim.bz/api/shortlinks/1/heads" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"head":"<code><link rel=\"apple-touch-icon\" sizes=\"[w]x[h]\" href=\"https:\/\/example.com\/image.jpeg\" \/><\/code>"}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/1/heads"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"head": "<code><link rel=\"apple-touch-icon\" sizes=\"[w]x[h]\" href=\"https:\/\/example.com\/image.jpeg\" \/><\/code>"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/shortlinks/1/heads',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'head' => '<code><link rel="apple-touch-icon" sizes="[w]x[h]" href="https://example.com/image.jpeg" /></code>',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"head": "<link rel=\"apple-touch-icon\" href=\"https:\/\/sharelocal-mbc.s3.us-east-2.amazonaws.com\/upload\/user\/users\/fb846b23-2032-4988-8621-ae750656dcac\/SQ5QULArNNiq2iUi.png\" \\\/>",
"created_at": "2021-08-03T08:14:23.000000Z"
}
}
Received response:
Request failed with error:
Update Head for shortlink.
requires authentication
You can update existing Head.
Example request:
curl -X PUT \
"http://links.lim.bz/api/shortlinks/15/heads/1" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"head":"dolorem"}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/15/heads/1"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"head": "dolorem"
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
'http://links.lim.bz/api/shortlinks/15/heads/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'head' => 'dolorem',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"head": "<link rel=\"apple-touch-icon\" href=\"https:\/\/sharelocal-mbc.s3.us-east-2.amazonaws.com\/upload\/user\/users\/fb846b23-2032-4988-8621-ae750656dcac\/SQ5QULArNNiq2iUi.png\" \\\/>",
"created_at": "2021-08-03T08:14:23.000000Z"
}
}
Received response:
Request failed with error:
Delete head for shortlink.
requires authentication
You can delete existing head. This action can not be undone!
Example request:
curl -X DELETE \
"http://links.lim.bz/api/shortlinks/18/heads/17" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/18/heads/17"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://links.lim.bz/api/shortlinks/18/heads/17',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{[]}
Received response:
Request failed with error:
Interstitials
Get shortlink all interstitials.
requires authentication
Get list of all interstitials for certain shortlink
Example request:
curl -X GET \
-G "http://links.lim.bz/api/shortlinks/19/interstitials" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/19/interstitials"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/shortlinks/19/interstitials',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": 2,
"type": "IFRAME",
"url": "https:\/\/ct.winlocal.io\/knadtest\/iframecontent\/index.html",
"html": null,
"title": null,
"body": null,
"is_default": 1,
"conditions": []
},
{
"id": 2,
"type": "IFRAME",
"url": "https:\/\/ct.winlocal.io\/knadtest\/iframecontent\/index.html",
"html": null,
"title": null,
"body": null,
"is_default": 1,
"conditions": []
}
]
}
Received response:
Request failed with error:
Create Interstitial for shortlink.
requires authentication
You can create new Interstitial for existing shortlink.
Example request:
curl -X POST \
"http://links.lim.bz/api/shortlinks/2/interstitials" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"type":"HTML","url":"alias","html":"eveniet","title":"quaerat","body":"maxime","is_default":false,"conditions":[{"type":"LATLONG","operator":"IN RANGE","first_date":"magni","second_date":"ut","first_time":"neque","second_time":"aliquam","continent_code":"omnis","continent":"dolor","country_code":"laboriosam","country":"ipsam","region_code":"itaque","region":"eaque","latitude":"qui","longitude":"odio","range":2,"temperature":7,"weather":"fugiat"},{"type":"LATLONG","operator":"IN RANGE","first_time":"neque","second_time":"aliquam","continent_code":"omnis","region_code":"itaque","region":"eaque","range":2,"temperature":7}]}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/2/interstitials"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "HTML",
"url": "alias",
"html": "eveniet",
"title": "quaerat",
"body": "maxime",
"is_default": false,
"conditions": [
{
"type": "LATLONG",
"operator": "IN RANGE",
"first_date": "magni",
"second_date": "ut",
"first_time": "neque",
"second_time": "aliquam",
"continent_code": "omnis",
"continent": "dolor",
"country_code": "laboriosam",
"country": "ipsam",
"region_code": "itaque",
"region": "eaque",
"latitude": "qui",
"longitude": "odio",
"range": 2,
"temperature": 7,
"weather": "fugiat"
},
{
"type": "LATLONG",
"operator": "IN RANGE",
"first_time": "neque",
"second_time": "aliquam",
"continent_code": "omnis",
"region_code": "itaque",
"region": "eaque",
"range": 2,
"temperature": 7
}
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/shortlinks/2/interstitials',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'type' => 'HTML',
'url' => 'alias',
'html' => 'eveniet',
'title' => 'quaerat',
'body' => 'maxime',
'is_default' => false,
'conditions' => [
[
'type' => 'LATLONG',
'operator' => 'IN RANGE',
'first_date' => 'magni',
'second_date' => 'ut',
'first_time' => 'neque',
'second_time' => 'aliquam',
'continent_code' => 'omnis',
'continent' => 'dolor',
'country_code' => 'laboriosam',
'country' => 'ipsam',
'region_code' => 'itaque',
'region' => 'eaque',
'latitude' => 'qui',
'longitude' => 'odio',
'range' => 2,
'temperature' => 7,
'weather' => 'fugiat',
],
[
'type' => 'LATLONG',
'operator' => 'IN RANGE',
'first_time' => 'neque',
'second_time' => 'aliquam',
'continent_code' => 'omnis',
'region_code' => 'itaque',
'region' => 'eaque',
'range' => 2,
'temperature' => 7,
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 2,
"type": "IFRAME",
"url": "https:\/\/ct.winlocal.io\/knadtest\/iframecontent\/index.html",
"html": null,
"title": null,
"body": null,
"is_default": 1,
"conditions": []
}
}
Received response:
Request failed with error:
Update Interstitial for shortlink.
requires authentication
You can update existing interstitial.
Example request:
curl -X PUT \
"http://links.lim.bz/api/shortlinks/18/interstitials/1" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"type":"POPUP","url":"http:\/\/www.hagenes.com\/rerum-voluptatem-ratione-neque-non-est-omnis.html","html":{},"title":{},"body":{}}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/18/interstitials/1"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "POPUP",
"url": "http:\/\/www.hagenes.com\/rerum-voluptatem-ratione-neque-non-est-omnis.html",
"html": {},
"title": {},
"body": {}
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
'http://links.lim.bz/api/shortlinks/18/interstitials/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'type' => 'POPUP',
'url' => 'http://www.hagenes.com/rerum-voluptatem-ratione-neque-non-est-omnis.html',
'html' => [],
'title' => [],
'body' => [],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 2,
"type": "IFRAME",
"url": "https:\/\/ct.winlocal.io\/knadtest\/iframecontent\/index.html",
"html": null,
"title": null,
"body": null,
"is_default": 1,
"conditions": []
}
}
Received response:
Request failed with error:
Delete Interstitial for shortlink.
requires authentication
You can delete existing Interstitial. This action can not be undone!
Example request:
curl -X DELETE \
"http://links.lim.bz/api/shortlinks/13/interstitials/10" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/13/interstitials/10"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://links.lim.bz/api/shortlinks/13/interstitials/10',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{[]}
Received response:
Request failed with error:
Linkedin Pixel
Get shortlink all Linkedin Pixel Partner Ids
requires authentication
Get list of all Linkedin Pixel Partner Ids for certain shortlink
Example request:
curl -X GET \
-G "http://links.lim.bz/api/shortlinks/1/linkedinpixels" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/1/linkedinpixels"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/shortlinks/1/linkedinpixels',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": null,
"linkedin_partner_id": null
},
{
"id": null,
"linkedin_partner_id": null
}
]
}
Received response:
Request failed with error:
Create Linkedin Pixel for existing shortlink
requires authentication
You can create new Linkedin Pixel for existing shortlink.
Example request:
curl -X POST \
"http://links.lim.bz/api/shortlinks/1/linkedinpixels" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"linkedin_partner_id":"viewContent"}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/1/linkedinpixels"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"linkedin_partner_id": "viewContent"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/shortlinks/1/linkedinpixels',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'linkedin_partner_id' => 'viewContent',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": null,
"linkedin_partner_id": null
}
}
Received response:
Request failed with error:
Delete Linkedin Pixel from shortlink.
requires authentication
You can delete existing Linkedin Pixel. This action can not be undone!
Example request:
curl -X DELETE \
"http://links.lim.bz/api/shortlinks/6/linkedinpixels/18" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/6/linkedinpixels/18"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://links.lim.bz/api/shortlinks/6/linkedinpixels/18',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{[]}
Received response:
Request failed with error:
OgTags
Get shortlink all tags.
requires authentication
Get list of all og tags for certain shortlink
Example request:
curl -X GET \
-G "http://links.lim.bz/api/shortlinks/1/ogtags" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/1/ogtags"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/shortlinks/1/ogtags',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": 1,
"property": "og:title",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 1,
"property": "og:title",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
}
]
}
Create OgTag for shortlink.
requires authentication
You can create new OgTag for existing shortlink.
Example request:
curl -X POST \
"http://links.lim.bz/api/shortlinks/1/ogtags" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"property":"og:title","content":"Title for my shortlink"}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/1/ogtags"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"property": "og:title",
"content": "Title for my shortlink"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/shortlinks/1/ogtags',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'property' => 'og:title',
'content' => 'Title for my shortlink',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"property": "og:title",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
}
}
Update OgTag for shortlink.
requires authentication
You can update existing OgTag.
Example request:
curl -X PUT \
"http://links.lim.bz/api/shortlinks/16/ogtags/13" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"property":"officia","content":"sunt"}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/16/ogtags/13"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"property": "officia",
"content": "sunt"
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
'http://links.lim.bz/api/shortlinks/16/ogtags/13',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'property' => 'officia',
'content' => 'sunt',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"property": "og:title",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
}
}
Delete OgTag for shortlink.
requires authentication
You can delete existing OgTag. This action can not be undone!
Example request:
curl -X DELETE \
"http://links.lim.bz/api/shortlinks/20/ogtags/5" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/20/ogtags/5"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://links.lim.bz/api/shortlinks/20/ogtags/5',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{[]}
Scripts
Get shortlink all scripts.
requires authentication
Get list of all scripts for certain shortlink
Example request:
curl -X GET \
-G "http://links.lim.bz/api/shortlinks/10/scripts" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/10/scripts"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/shortlinks/10/scripts',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": null,
"script": null,
"noscript": null
},
{
"id": null,
"script": null,
"noscript": null
}
]
}
Received response:
Request failed with error:
Create Script for shortlink.
requires authentication
You can create new Scripts for existing shortlink.
Example request:
curl -X POST \
"http://links.lim.bz/api/shortlinks/19/scripts" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"script":"enim","noscript":"quia"}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/19/scripts"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"script": "enim",
"noscript": "quia"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/shortlinks/19/scripts',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'script' => 'enim',
'noscript' => 'quia',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": null,
"script": null,
"noscript": null
}
}
Received response:
Request failed with error:
Update Script for shortlink.
requires authentication
You can update existing Script.
Example request:
curl -X PUT \
"http://links.lim.bz/api/shortlinks/9/scripts/totam" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"script":"beatae","noscript":{}}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/9/scripts/totam"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"script": "beatae",
"noscript": {}
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
'http://links.lim.bz/api/shortlinks/9/scripts/totam',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'script' => 'beatae',
'noscript' => [],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Delete Script for shortlink.
requires authentication
You can delete existing Script. This action can not be undone!
Example request:
curl -X DELETE \
"http://links.lim.bz/api/shortlinks/16/scripts/13" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/16/scripts/13"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://links.lim.bz/api/shortlinks/16/scripts/13',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Shortlinks
Get all shortlinks
requires authentication
Returns all shortlinks assigned to application.
Example request:
curl -X GET \
-G "http://links.lim.bz/api/shortlinks?filter[alias]=quia" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks"
);
let params = {
"filter[alias]": "quia",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/shortlinks',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'filter[alias]'=> 'quia',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": 1,
"shortlink": "linkto.us\/bedford",
"domain": "linkto.us",
"subdomain": null,
"og_tags": [
{
"id": 1,
"property": "og:title",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 2,
"property": "og:site_name",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 3,
"property": "og:description",
"content": "135 Bedford St. Stamford — 203-973-7888",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 4,
"property": "og:image",
"content": "https:\/\/d1fdloi71mui9q.cloudfront.net\/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 5,
"property": "og:type",
"content": "website",
"created_at": "2020-11-23T16:08:32.000000Z"
},
{
"id": 6,
"property": "og:url",
"content": "http:\/\/linkto.us\/bedford",
"created_at": "2020-11-23T16:09:10.000000Z"
}
],
"pixel_tracks": [],
"scripts": [],
"signals": [],
"interstitials": [],
"destinations": [
{
"id": 1,
"uri": "https:\/\/ct.winlocal.io\/bedford",
"is_default": 1,
"conditions": []
}
]
},
{
"id": 1,
"shortlink": "linkto.us\/bedford",
"domain": "linkto.us",
"subdomain": null,
"og_tags": [
{
"id": 1,
"property": "og:title",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 2,
"property": "og:site_name",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 3,
"property": "og:description",
"content": "135 Bedford St. Stamford — 203-973-7888",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 4,
"property": "og:image",
"content": "https:\/\/d1fdloi71mui9q.cloudfront.net\/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 5,
"property": "og:type",
"content": "website",
"created_at": "2020-11-23T16:08:32.000000Z"
},
{
"id": 6,
"property": "og:url",
"content": "http:\/\/linkto.us\/bedford",
"created_at": "2020-11-23T16:09:10.000000Z"
}
],
"pixel_tracks": [],
"scripts": [],
"signals": [],
"interstitials": [],
"destinations": [
{
"id": 1,
"uri": "https:\/\/ct.winlocal.io\/bedford",
"is_default": 1,
"conditions": []
}
]
}
]
}
Received response:
Request failed with error:
Get single shortlink
requires authentication
Returns single shortlinks assigned to application with all conditions.
Example request:
curl -X GET \
-G "http://links.lim.bz/api/shortlinks/1" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/1"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/shortlinks/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"shortlink": "linkto.us\/bedford",
"domain": "linkto.us",
"subdomain": null,
"og_tags": [
{
"id": 1,
"property": "og:title",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 2,
"property": "og:site_name",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 3,
"property": "og:description",
"content": "135 Bedford St. Stamford — 203-973-7888",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 4,
"property": "og:image",
"content": "https:\/\/d1fdloi71mui9q.cloudfront.net\/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 5,
"property": "og:type",
"content": "website",
"created_at": "2020-11-23T16:08:32.000000Z"
},
{
"id": 6,
"property": "og:url",
"content": "http:\/\/linkto.us\/bedford",
"created_at": "2020-11-23T16:09:10.000000Z"
}
],
"pixel_tracks": [],
"scripts": [],
"signals": [],
"interstitials": [],
"destinations": [
{
"id": 1,
"uri": "https:\/\/ct.winlocal.io\/bedford",
"is_default": 1,
"conditions": []
}
]
}
}
Received response:
Request failed with error:
Get shortlinks via external_id
requires authentication
Returns all shortlinks with given external_id.
Example request:
curl -X GET \
-G "http://links.lim.bz/api/shortlinks/external/10" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/external/10"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/shortlinks/external/10',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": 1,
"shortlink": "linkto.us\/bedford",
"domain": "linkto.us",
"subdomain": null,
"og_tags": [
{
"id": 1,
"property": "og:title",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 2,
"property": "og:site_name",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 3,
"property": "og:description",
"content": "135 Bedford St. Stamford — 203-973-7888",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 4,
"property": "og:image",
"content": "https:\/\/d1fdloi71mui9q.cloudfront.net\/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 5,
"property": "og:type",
"content": "website",
"created_at": "2020-11-23T16:08:32.000000Z"
},
{
"id": 6,
"property": "og:url",
"content": "http:\/\/linkto.us\/bedford",
"created_at": "2020-11-23T16:09:10.000000Z"
}
],
"pixel_tracks": [],
"scripts": [],
"signals": [],
"interstitials": [],
"destinations": [
{
"id": 1,
"uri": "https:\/\/ct.winlocal.io\/bedford",
"is_default": 1,
"conditions": []
}
],
"stats": {
"id": 1,
"breakdown": "OVERALL",
"shortlink": "linkto.us\/bedford",
"stats": {
"base": {
"entries": [
{
"date": "overall",
"entries": 8591,
"unique_entries": 4947,
"source": {
"facebook": 3,
"instagram": 0,
"twitter": 0,
"linkedin": 0,
"direct": 8588
}
}
],
"destinations": [
{
"id": 1,
"uri": "https:\/\/ct.winlocal.io\/bedford",
"redirections": {
"date": "overall",
"redirections": 1246
}
}
]
}
}
}
},
{
"id": 1,
"shortlink": "linkto.us\/bedford",
"domain": "linkto.us",
"subdomain": null,
"og_tags": [
{
"id": 1,
"property": "og:title",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 2,
"property": "og:site_name",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 3,
"property": "og:description",
"content": "135 Bedford St. Stamford — 203-973-7888",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 4,
"property": "og:image",
"content": "https:\/\/d1fdloi71mui9q.cloudfront.net\/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 5,
"property": "og:type",
"content": "website",
"created_at": "2020-11-23T16:08:32.000000Z"
},
{
"id": 6,
"property": "og:url",
"content": "http:\/\/linkto.us\/bedford",
"created_at": "2020-11-23T16:09:10.000000Z"
}
],
"pixel_tracks": [],
"scripts": [],
"signals": [],
"interstitials": [],
"destinations": [
{
"id": 1,
"uri": "https:\/\/ct.winlocal.io\/bedford",
"is_default": 1,
"conditions": []
}
],
"stats": {
"id": 1,
"breakdown": "OVERALL",
"shortlink": "linkto.us\/bedford",
"stats": {
"base": {
"entries": [
{
"date": "overall",
"entries": 8591,
"unique_entries": 4947,
"source": {
"facebook": 3,
"instagram": 0,
"twitter": 0,
"linkedin": 0,
"direct": 8588
}
}
],
"destinations": [
{
"id": 1,
"uri": "https:\/\/ct.winlocal.io\/bedford",
"redirections": {
"date": "overall",
"redirections": 1246
}
}
]
}
}
}
}
],
"links": {
"first": "\/?page=1",
"last": "\/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "\/",
"per_page": "15",
"to": 2,
"total": 2
}
}
Received response:
Request failed with error:
Create shortlink
requires authentication
Comfortable endpoint to create shortlink with with all its components like Interstitials, OgTag, etc..
Example request:
curl -X POST \
"http://links.lim.bz/api/shortlinks" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"alias":"test","default_destination_uri":"https:\/\/www.winlocalnow.com","subdomain_id":1,"domain":"yourdomian.com","hide_nav_bar":"true","subdomain":"links","external_id":111,"external_metadata":{"systemId":"Qh7f43hXfufLWdsaPQsab43u","timestamp":1607186812},"og_tags":[{"property":"og:title","content":"My title seen on Facebook"},{"property":"og:title","content":"My title seen on Facebook"}],"pixel_tracks":[{"action":"distinctio","attributes":[{"key":"consequatur","value":{}},[[],[]]]},{"action":"distinctio","attributes":[[]]}],"scripts":[{"script":"incidunt","noscript":"molestiae"},{"script":"incidunt","noscript":"molestiae"}],"interstitials":[{"type":"HTML","url":"http:\/\/www.roberts.net\/quae-totam-debitis-nisi-commodi-sit-laboriosam-alias.html","html":{},"title":{},"body":{},"is_default":"1","conditions":[{"type":"RETURNING"}]}],"destinations":[{"uri":"eos","conditions":["asperiores"],"is_default":false},{"uri":"eos","conditions":["asperiores"]}],"signals":[{"method":"POST","events":["destination.redirected","shortlink.entered"],"conditions":[{"type":"REGION"}],"is_default":"1"}]}'
const url = new URL(
"http://links.lim.bz/api/shortlinks"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"alias": "test",
"default_destination_uri": "https:\/\/www.winlocalnow.com",
"subdomain_id": 1,
"domain": "yourdomian.com",
"hide_nav_bar": "true",
"subdomain": "links",
"external_id": 111,
"external_metadata": {
"systemId": "Qh7f43hXfufLWdsaPQsab43u",
"timestamp": 1607186812
},
"og_tags": [
{
"property": "og:title",
"content": "My title seen on Facebook"
},
{
"property": "og:title",
"content": "My title seen on Facebook"
}
],
"pixel_tracks": [
{
"action": "distinctio",
"attributes": [
{
"key": "consequatur",
"value": {}
},
[
[],
[]
]
]
},
{
"action": "distinctio",
"attributes": [
[]
]
}
],
"scripts": [
{
"script": "incidunt",
"noscript": "molestiae"
},
{
"script": "incidunt",
"noscript": "molestiae"
}
],
"interstitials": [
{
"type": "HTML",
"url": "http:\/\/www.roberts.net\/quae-totam-debitis-nisi-commodi-sit-laboriosam-alias.html",
"html": {},
"title": {},
"body": {},
"is_default": "1",
"conditions": [
{
"type": "RETURNING"
}
]
}
],
"destinations": [
{
"uri": "eos",
"conditions": [
"asperiores"
],
"is_default": false
},
{
"uri": "eos",
"conditions": [
"asperiores"
]
}
],
"signals": [
{
"method": "POST",
"events": [
"destination.redirected",
"shortlink.entered"
],
"conditions": [
{
"type": "REGION"
}
],
"is_default": "1"
}
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/shortlinks',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'alias' => 'test',
'default_destination_uri' => 'https://www.winlocalnow.com',
'subdomain_id' => 1,
'domain' => 'yourdomian.com',
'hide_nav_bar' => 'true',
'subdomain' => 'links',
'external_id' => 111,
'external_metadata' => [
'systemId' => 'Qh7f43hXfufLWdsaPQsab43u',
'timestamp' => 1607186812,
],
'og_tags' => [
[
'property' => 'og:title',
'content' => 'My title seen on Facebook',
],
[
'property' => 'og:title',
'content' => 'My title seen on Facebook',
],
],
'pixel_tracks' => [
[
'action' => 'distinctio',
'attributes' => [
[
'key' => 'consequatur',
'value' => [],
],
[
[],
[],
],
],
],
[
'action' => 'distinctio',
'attributes' => [
[],
],
],
],
'scripts' => [
[
'script' => 'incidunt',
'noscript' => 'molestiae',
],
[
'script' => 'incidunt',
'noscript' => 'molestiae',
],
],
'interstitials' => [
[
'type' => 'HTML',
'url' => 'http://www.roberts.net/quae-totam-debitis-nisi-commodi-sit-laboriosam-alias.html',
'html' => [],
'title' => [],
'body' => [],
'is_default' => '1',
'conditions' => [
[
'type' => 'RETURNING',
],
],
],
],
'destinations' => [
[
'uri' => 'eos',
'conditions' => [
'asperiores',
],
'is_default' => false,
],
[
'uri' => 'eos',
'conditions' => [
'asperiores',
],
],
],
'signals' => [
[
'method' => 'POST',
'events' => [
'destination.redirected',
'shortlink.entered',
],
'conditions' => [
[
'type' => 'REGION',
],
],
'is_default' => '1',
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"shortlink": "linkto.us\/bedford",
"domain": "linkto.us",
"subdomain": null,
"og_tags": [
{
"id": 1,
"property": "og:title",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 2,
"property": "og:site_name",
"content": "Bedford Hall Craft Kitchen & Bar",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 3,
"property": "og:description",
"content": "135 Bedford St. Stamford — 203-973-7888",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 4,
"property": "og:image",
"content": "https:\/\/d1fdloi71mui9q.cloudfront.net\/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495",
"created_at": "2020-11-23T16:00:30.000000Z"
},
{
"id": 5,
"property": "og:type",
"content": "website",
"created_at": "2020-11-23T16:08:32.000000Z"
},
{
"id": 6,
"property": "og:url",
"content": "http:\/\/linkto.us\/bedford",
"created_at": "2020-11-23T16:09:10.000000Z"
}
],
"pixel_tracks": [],
"scripts": [],
"signals": [],
"interstitials": [],
"destinations": [
{
"id": 1,
"uri": "https:\/\/ct.winlocal.io\/bedford",
"is_default": 1,
"conditions": []
}
]
}
}
Received response:
Request failed with error:
Check alias
requires authentication
You can check alias availability in scope of domain or subdomain. Response with status code 200 means that alias is available. Response with status code 422 means that alias has been already taken.
Example request:
curl -X POST \
"http://links.lim.bz/api/shortlinks/check" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"alias":"test","domain":"linkto.us","domain_id":1,"subdomain":"rem"}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/check"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"alias": "test",
"domain": "linkto.us",
"domain_id": 1,
"subdomain": "rem"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/shortlinks/check',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'alias' => 'test',
'domain' => 'linkto.us',
'domain_id' => 1,
'subdomain' => 'rem',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"status": "available",
"shortlink": "www.linkto.us\/test"
}
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"alias": [
"Shortlink alias must be unique in scope of subdomain."
]
}
}
Example response (403):
{
"message": "This action is unauthorized."
}
Received response:
Request failed with error:
Delete shortlink
requires authentication
You can delete existing shortlink. This action can not be undone! Shortlink statistics will not be accessible from API.
Example request:
curl -X DELETE \
"http://links.lim.bz/api/shortlinks/20" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/20"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://links.lim.bz/api/shortlinks/20',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Signals
Get shortlink all signals.
requires authentication
Get list of all signals for certain shortlink
Example request:
curl -X GET \
-G "http://links.lim.bz/api/shortlinks/11/signals" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/11/signals"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/shortlinks/11/signals',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": [
{
"id": 1,
"method": "POST",
"events": [
"shortlink.entered",
"destination.redirected"
],
"is_default": true,
"created_at": "2021-01-21T21:00:35.000000Z",
"conditions": []
},
{
"id": 1,
"method": "POST",
"events": [
"shortlink.entered",
"destination.redirected"
],
"is_default": true,
"created_at": "2021-01-21T21:00:35.000000Z",
"conditions": []
}
]
}
Received response:
Request failed with error:
Create Signal for shortlink.
requires authentication
You can create new Signal for existing shortlink.
Example request:
curl -X POST \
"http://links.lim.bz/api/shortlinks/9/signals" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"method":"GET","events":["destination.redirected","shortlink.entered"],"is_default":false,"conditions":[{"type":"LATLONG","operator":"IN RANGE","first_date":"aut","second_date":"et","first_time":"labore","second_time":"assumenda","continent_code":"quam","continent":"sit","country_code":"aut","country":"molestias","region_code":"consequatur","region":"quos","latitude":"nesciunt","longitude":"sapiente","range":10,"temperature":15,"weather":"voluptates"},{"type":"LATLONG","operator":"IN RANGE","second_time":"assumenda","continent":"sit","country_code":"aut","country":"molestias","region_code":"consequatur","region":"quos","latitude":"nesciunt","longitude":"sapiente","range":10,"weather":"voluptates"}]}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/9/signals"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"method": "GET",
"events": [
"destination.redirected",
"shortlink.entered"
],
"is_default": false,
"conditions": [
{
"type": "LATLONG",
"operator": "IN RANGE",
"first_date": "aut",
"second_date": "et",
"first_time": "labore",
"second_time": "assumenda",
"continent_code": "quam",
"continent": "sit",
"country_code": "aut",
"country": "molestias",
"region_code": "consequatur",
"region": "quos",
"latitude": "nesciunt",
"longitude": "sapiente",
"range": 10,
"temperature": 15,
"weather": "voluptates"
},
{
"type": "LATLONG",
"operator": "IN RANGE",
"second_time": "assumenda",
"continent": "sit",
"country_code": "aut",
"country": "molestias",
"region_code": "consequatur",
"region": "quos",
"latitude": "nesciunt",
"longitude": "sapiente",
"range": 10,
"weather": "voluptates"
}
]
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://links.lim.bz/api/shortlinks/9/signals',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'method' => 'GET',
'events' => [
'destination.redirected',
'shortlink.entered',
],
'is_default' => false,
'conditions' => [
[
'type' => 'LATLONG',
'operator' => 'IN RANGE',
'first_date' => 'aut',
'second_date' => 'et',
'first_time' => 'labore',
'second_time' => 'assumenda',
'continent_code' => 'quam',
'continent' => 'sit',
'country_code' => 'aut',
'country' => 'molestias',
'region_code' => 'consequatur',
'region' => 'quos',
'latitude' => 'nesciunt',
'longitude' => 'sapiente',
'range' => 10,
'temperature' => 15,
'weather' => 'voluptates',
],
[
'type' => 'LATLONG',
'operator' => 'IN RANGE',
'second_time' => 'assumenda',
'continent' => 'sit',
'country_code' => 'aut',
'country' => 'molestias',
'region_code' => 'consequatur',
'region' => 'quos',
'latitude' => 'nesciunt',
'longitude' => 'sapiente',
'range' => 10,
'weather' => 'voluptates',
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"method": "POST",
"events": [
"shortlink.entered",
"destination.redirected"
],
"is_default": true,
"created_at": "2021-01-21T21:00:35.000000Z",
"conditions": []
}
}
Received response:
Request failed with error:
Update Signal for shortlink.
requires authentication
You can update existing signal.
Example request:
curl -X PUT \
"http://links.lim.bz/api/shortlinks/18/signals/12" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"method":"GET","events":["destination.redirected","shortlink.entered"]}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/18/signals/12"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"method": "GET",
"events": [
"destination.redirected",
"shortlink.entered"
]
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
'http://links.lim.bz/api/shortlinks/18/signals/12',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'method' => 'GET',
'events' => [
'destination.redirected',
'shortlink.entered',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"method": "POST",
"events": [
"shortlink.entered",
"destination.redirected"
],
"is_default": true,
"created_at": "2021-01-21T21:00:35.000000Z",
"conditions": []
}
}
Received response:
Request failed with error:
Delete Signal for shortlink.
requires authentication
You can delete existing Signal. This action can not be undone!
Example request:
curl -X DELETE \
"http://links.lim.bz/api/shortlinks/8/signals/10" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/shortlinks/8/signals/10"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://links.lim.bz/api/shortlinks/8/signals/10',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{[]}
Received response:
Request failed with error:
Stats
Application statistics
requires authentication
Show all available statistics for application.
Example request:
curl -X GET \
-G "http://links.lim.bz/api/app/stats" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://links.lim.bz/api/app/stats"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/app/stats',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 3,
"breakdown": "OVERALL",
"application": "John Lim Application",
"stats": {
"base": {
"entries": {
"date": "overall",
"entries": 14804,
"unique_entries": 8623,
"source": {
"facebook": 3,
"instagram": 0,
"twitter": 0,
"linkedin": 0,
"direct": 14801
}
}
}
}
}
}
Received response:
Request failed with error:
Shortlink statistics
requires authentication
Show all available statistics for shortlink.
Example request:
curl -X GET \
-G "http://links.lim.bz/api/shortlinks/1/stats" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"breakdown":"OVERALL","startDate":"2021-04-26T07:42:24+0000","endDate":"2021-04-26T07:42:24+0000"}'
const url = new URL(
"http://links.lim.bz/api/shortlinks/1/stats"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"breakdown": "OVERALL",
"startDate": "2021-04-26T07:42:24+0000",
"endDate": "2021-04-26T07:42:24+0000"
}
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://links.lim.bz/api/shortlinks/1/stats',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'breakdown' => 'OVERALL',
'startDate' => '2021-04-26T07:42:24+0000',
'endDate' => '2021-04-26T07:42:24+0000',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"id": 1,
"breakdown": "OVERALL",
"shortlink": "linkto.us\/bedford",
"stats": {
"base": {
"entries": [
{
"date": "overall",
"entries": 8591,
"unique_entries": 4947,
"source": {
"facebook": 3,
"instagram": 0,
"twitter": 0,
"linkedin": 0,
"direct": 8588
}
}
],
"destinations": [
{
"id": 1,
"uri": "https:\/\/ct.winlocal.io\/bedford",
"redirections": {
"date": "overall",
"redirections": 1246
}
}
]
}
}
}
}
Received response:
Request failed with error: