Skip to main content

High volume short link creation

With the Short.io API, you can shorten up to 1000 links in one API call. You can create 5 requests per 10 seconds (1 request = 1000 URLs).

📘

Please ensure that the Short.io pricing plan you select fits all of your links. We recommend opting for the Enterprise plan, which offers unlimited links.

  1. Create a secret API key from the Integrations and API menu: https://app.short.io/settings/integrations/api-key.
  2. Then you may need to install prerequisites for HTTP requests (if necessary, depending on your programming language and its version).
  3. With the following code snippet examples you will be able to generate short URLs in bulk:

📘

We advise using the TTL parameter when generating a short link from our API.

Please replace {user.domain_name} , {user.apiKey} ,{user.first_path} and {user.second_path} (the new slugs to be applied), {user.first_long_url} , {user.second_long_url} and {user.ttl} with the appropriate values.

<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.short.io/links/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'allowDuplicates' => false,
'links' => [
[
'originalURL' => '<<first_long_url>>',
'path' => '<<first_path>>',
'ttl' => '<<ttl>>'
],
[
'originalURL' => '<<second_long_url>>',
'path' => '<<second_path>>',
'ttl' => '<<ttl>>'
]
],
'domain' => '<<domain_name>>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <<apiKey>>",
"content-type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}

📘

The code above returns a list of two link objects. In case a URL cannot be inserted, an error object is returned as an element of the array instead. The method is non-transactional; it may successfully insert certain links from the list while generating errors for others.

  1. Review the JSON response which should resemble the following:
[
{
originalURL: 'https://developers.short.io/reference/post_links-bulk',
DomainId: 11111,
archived: false,
cloaking: false,
createdAt: '2025-05-13T13:19:32.111Z',
updatedAt: '2025-05-13T13:19:32.111Z',
OwnerId: 11111,
tags: [],
skipQS: false,
path: 'post_links-bulk',
id: 'lnk_4RF8_W1IQ9qq7',
idString: 'lnk_4RF8_W1IQ9qq7',
ttl: '2025-05-22T12:38:23.000Z',
shortURL: 'https://shortiotest.com/post_links-bulk',
secureShortURL: 'https://shortiotest.com/post_links-bulk',
duplicate: false,
success: true
},
{
originalURL: 'https://developers.short.io/docs/high-volume-short-link-creation',
DomainId: 11111,
archived: false,
cloaking: false,
createdAt: '2025-05-13T13:19:32.198Z',
updatedAt: '2025-05-13T13:19:32.198Z',
OwnerId: 11111,
tags: [],
skipQS: false,
path: 'short-link-creation',
id: 'lnk_4RF8_tsGgZuhW2',
idString: 'lnk_4RF8_tsGgZuhW2',
ttl: '2025-05-22T12:38:23.000Z',
shortURL: 'https://shortiotest.com/short-link-creation',
secureShortURL: 'https://shortiotest.com/short-link-creation',
duplicate: false,
success: true
}

Similarly, you can create up to 1000 links in one API call.

You can find more information on bulk link creation parameters in the following page: https://developers.short.io/reference/post_links-bulk