Find the answers you need

Support Database

How do I provision a hosting package via the API?

POST /reseller/{id}/addWeb

The /reseller/{id}/addWeb endpoint permits the creation of hosting packages.

PHP examples use our API wrapper, which can be downloaded here:



<span class="hljs-meta">require_once “vendor/autoload.php”; //We specify the API wrapper location.<br /> $bearer_token = “INSERT YOUR GENERAL API KEY”; //Your 20i API key.<br /> $services_api = new \TwentyI\API\Services($bearer_token);<br /> $domain = “”; //The primary domain we wish to assign to our new package.<br /> $addPackage = [“domain_name” => $domain, “type” => “811”]; //These are our supported arguments. For example, the name of the package we've just defined, and the package type we'd like to create the package as.<br /> $response = $services_api->postWithFields(”/reseller/*/addWeb”, $addPackage);</span>


    "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


The initial domain name for the site


Array of zero or more extra domain names


The memorable name for the package


A map of domain names to intended document roots


eg. “stack-user:1”. An existing Stack user to link to the package.