The getShortLinks gets all the short links and returns the reponse to users
curl --location 'https://apis.divsly.com/api/v1/bulk-delete' \
--header 'Authorization: Bearer oauth2_XdwUa1OJE' \
--header 'Content-Type: application/json' \
--data '{
"bulkLinks": [
{
"id": 123,
"type": "shortlink"
},
{
"id": 456,
"type": "QR"
}
]
}'
fetch('https://apis.divsly.com/api/v1/bulk-delete', {
method: 'POST',
headers: {
'Authorization': 'Bearer oauth2_XdwUa1OJE',
'Content-Type': 'application/json'
},
body: JSON.stringify({
bulkLinks: [
{
id: 123,
type: 'shortlink'
},
{
id: 456,
type: 'QR'
}
]
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const axios = require('axios');
const data = {
bulkLinks: [
{
id: 123,
type: 'shortlink'
},
{
id: 456,
type: 'QR'
}
]
};
axios.post(
'https://apis.divsly.com/api/v1/bulk-delete',
data,
{
headers: {
Authorization: 'Bearer oauth2_XdwUa1OJE',
'Content-Type': 'application/json'
}
}
)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error.response?.data || error.message);
});
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://apis.divsly.com/api/v1/bulk-delete',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer oauth2_XdwUa1OJE',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'bulkLinks' => [
[
'id' => 123,
'type' => 'shortlink'
],
[
'id' => 456,
'type' => 'QR'
]
]
])
]);
$response = curl_exec($curl);
if (curl_errno($curl)) {
echo 'Error: ' . curl_error($curl);
} else {
echo $response;
}
curl_close($curl);
import requests
url = "https://apis.divsly.com/api/v1/bulk-delete"
headers = {
"Authorization": "Bearer oauth2_XdwUa1OJE",
"Content-Type": "application/json"
}
payload = {
"bulkLinks": [
{
"id": 123,
"type": "shortlink"
},
{
"id": 456,
"type": "QR"
}
]
}
response = requests.post(url, json=payload, headers=headers)
print(response.status_code)
print(response.json())
{
"success": true,
"erroredData": [],
"message": "Query executed successfully!",
"resultData": [
{
"id": 1165,
"type": "shortlink",
"type2": null,
"userId": 92,
"clicks": 0,
"lbClicks": 0,
"scans": 0,
"destinationUrl": "https://example.com/page1",
"faviconUrl": "",
"title": "Example Page 1",
"titleLabel": "example page 1",
"btnLabel": null,
"brandedDomain": "your-domain.com",
"slashTag": "9zqpq",
"edit": 0,
"utm_id": "",
"utm_content": "",
"utm_term": "",
"utm_campaign": "summer2024",
"utm_medium": "import",
"utm_source": "bulk",
"preset": null,
"bgColor": null,
"color": null,
"pattern": null,
"corner": null,
"logo": null,
"qr": null,
"qrLogoId": null,
"tags": "promo,summer",
"linkInBioId": null,
"uniqueTagId": 1224,
"isActive": true,
"isStarred": false,
"expirationDate": "2025-06-25T05:52:49.715Z",
"createdAt": "2025-03-27T05:52:49.718Z",
"updatedAt": "2025-03-27T05:52:49.718Z",
"fieldData": null,
"frame": null,
"isadminblocked": false,
"isEdit": false,
"password": null,
"passwordProtectionEnabled": false,
"primary": null,
"qrType": null,
"secondary": null,
"text": null,
"textColor": null
},
{
"id": 1166,
"type": "shortlink",
"type2": null,
"userId": 92,
"clicks": 0,
"lbClicks": 0,
"scans": 0,
"destinationUrl": "https://example.com/page2",
"faviconUrl": "",
"title": "Example Page 2",
"titleLabel": "example page 2",
"btnLabel": null,
"brandedDomain": "your-domain.com",
"slashTag": "hs5c9",
"edit": 0,
"utm_id": null,
"utm_content": null,
"utm_term": null,
"utm_campaign": null,
"utm_medium": null,
"utm_source": null,
"preset": null,
"bgColor": null,
"color": null,
"pattern": null,
"corner": null,
"logo": null,
"qr": null,
"qrLogoId": null,
"tags": "winter,promo",
"linkInBioId": null,
"uniqueTagId": 1225,
"isActive": true,
"isStarred": false,
"expirationDate": "2025-06-25T05:53:00.271Z",
"createdAt": "2025-03-27T05:53:00.273Z",
"updatedAt": "2025-03-27T05:53:00.273Z",
"fieldData": null,
"frame": null,
"isadminblocked": false,
"isEdit": false,
"password": null,
"passwordProtectionEnabled": false,
"primary": null,
"qrType": null,
"secondary": null,
"text": null,
"textColor": null
}
]
}
{
"message": "Unauthorized!"
}
{ success: false, error: “Bulk deletion failed }