Skip to main content

Deleting a Domain

📘 Information below might be outdated - please visit our recently updated API Reference

The instruction below shows how to delete a domain from your Short.io account

1) Get your secret API key here: https://app.short.io/settings/integrations/api-key​

  • Click "Create API key".
  • Add a Secret key.

2) Copy an ID of a domain you want to delete.​

  • Open Domain settings.
  • Copy domain ID.

3) Install prerequisites for requests.​

pip install requests

Now everything is ready to run the following snippet. It will delete a domain.

4) Create a file: filename.py/ .js/ .rb. Use the code snippet below.​

📘

Please, replace domainID with appropriate value.

import requests

url = "https://api.short.io/domains/delete/domainID"

headers = {'authorization': '<<apiKey>>'}

response = requests.request("POST", url, headers=headers)

print(response.text)

5) Launch the file.​

python filename.py

6) JSON Response (the domain will be deleted).​

Once you run the code, you will see the response.

{
success: true
}