How do I provision a hosting package via the API?
What is the 20i Reseller Hosting API?
The 20i Reseller API gives you access to all the features and functionality of StackCP, allowing you to create a hosting control panel from scratch or integrate external services such as WHMCS.
This is for advanced reseller hosting users and the support we provide for the Reseller API is service-based only.
How to provision a hosting package via the API?
The /reseller/{id}/addWeb endpoint permits the creation of hosting packages.
PHP examples use our API wrapper, which can be downloaded here: https://my.20i.com/reseller/api
PHP
Request:
Result:
{
"result": 866239
}
The response will contain the ID of the newly created package.
Supported arguments
"type" | string |
A web type reference, equivalent to the id in /packageTypes |
"domain_name" | string |
The initial domain name for the site |
"extra_domain_names" | string[] |
Array of zero or more extra domain names |
"label" | string |
The memorable name for the package |
"documentRoots" | object |
A map of domain names to intended document roots |
"stackUser" | string|null |
eg. "stack-user:1". An existing Stack user to link to the package. |