The SiteHost API enables programmatic access to the systems, tools and resources in your SiteHost account. You can retrieve information and execute actions on your resources using simple HTTP requests.
Please check the SiteHost API Documentation for a list of available endpoints. Code samples are provided in various programming languages including JavaScript, PHP, Rails and Python to get you started.
To start working with the SiteHost API you will need an API Key, which you can create via the API module in SiteHost Control Panel, do note that your account will need to have two-factor authentication enabled before you can do so.
Navigate to the API module at the bottom left of the SiteHost Control Panel.
Click the “Add API Key” icon in the top right corner of the API key list.
Enter a label for your key.
This helps you identify which key it is, for example: the purpose of the key or whose it is.
Select which API modules you wish the key to have access to.
Modules are distinct areas of the API you can interact with. The modules correspond to the available endpoints as seen in our API Documentation.
For organisation and security reasons, we recommend you to apply the principle of least privilege when you are creating an API key. This means you should limit the modules on your key to just the ones it needs to perform its function.
To lock your API key down so it can only be used from trusted IP addresses, add them to the Allowed IP Addresses section. Otherwise the API key can be used from anywhere.
Click “Add API Key”.
A green banner will appear containing your newly created API key. Store this safely as the key will only be shown once and cannot be retrieved again, only regenerated.
…
menu to expand it and select “Edit Key”.
…
menu to expand it and select “Regenerate Key”.Be aware that any services using this key will cease to work until you update them with the new key.
…
menu to expand it and select “Remove Key”.Be aware that any services using this key will cease to work after it’s deleted.