Deleting a short URL
Instructions on how to remove an existing short link
To delete an existing short link
- Create a secret API key from the Integrations and API menu: https://app.short.io/settings/integrations/api-key
- Get the ID of the short link which you want to delete:
- In the Short.io Dashboard open the link for editing:

- Copy the link ID from your browser's address bar:

- Install prerequisites for requests (if necessary, depending on your programming language):
pip install requests
- Using the code snippet below, create a file: filename.py/ .js/ .rb
Please replace LINK_ID and APIKEY with the appropriate values.
import requests
url = "https://api.short.io/links/LINK_ID"
headers = {'authorization': '<<apiKey>>'}
response = requests.request("DELETE", url, headers=headers)
print(response.text)
const data = {
"link_id":'LINK_ID'
};
const options = {
headers: {
accept: 'application/json',
'content-type': 'application/json',
authorization: '<<apiKey>>'
},
method: "delete",
body: JSON.stringify(data)
};
const response = await fetch('https://api.short.io/links/LINK_ID', options)
console.log(await response.json());
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.short.io/links/LINK_ID")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Delete.new(url)
request["authorization"] = 'API_KEY'
response = http.request(request)
puts response.read_body
- Launch the file:
python filename.py
node filename.js
ruby filename.rb
- The JSON response should be "success": true, idString: 'LINK_ID' :
{
"success": true,
idString: 'LINK_ID'
}
Most important key in the response is idString.
Updated 7 days ago