Available PHP/JSON API for Developers
The following examples are simple API calls for the SonicPanel software. You can use the API to develop your own custom automation for SonicPanel or billing modules and systems including client management. We tried to keep the example codes as simple as possible for everyone.
Requirements & Limits:
- You need your API key to make calls. You can simply get your own API key from the Root SonicPanel >> Billing & Automation(API) link on the left menu. Copy your API key to use it with the following API calls.
- The brute force protection is enabled by default on API calls, sending invalid API key 5 times will get your website/source server IP blocked for 1 hour. You may disable the brute force protection service from the Root SonicPanel >> Service Manager on the left menu during the development to prevent unwanted blocks. Remember to enable the brute force service when going for production.
Available API Calls/Actions
API Calls are simple curl calls and the API returns JSON output from the server as a result.
- Lists available radio/account packages by comma that are created on SonicPanel root and the packs required to be used on radio creations. Create some packages from the SonicPanel Root >> Add a Package link on the left menu. You can use the package names on create function to create a radio later on. You may save the packages on your own database for future usage or call the packs action to retrive them whenever needed.
- Create a radio with the package name from the sonicpanel server easily. You can also list packages on a form to allow user to select on order form or send the package name from your script, make sure to send the package name exactly to API. For example shoutcast50 or unlimitedsc named packages are listed on the SP server root panel >> edit/list packages link from the left menu can be used. This call also returns radio port information, see the example below.
- Change existed SonicPanel user login password on the server.
- Change existed SonicPanel user radio package/plan. Useful for upgrade/downgrade or changing radio systems.
- Terminate/Delete user and the radio from the SonicPanel server.
- Suspend user and the radio on the SonicPanel server.
- UnSuspend user and the radio on the SonicPanel server.