Packages

get
List

https://hyper.host/api/v1/packages
List all hosting packages under your account.
Request
Response
200: OK
{
"id": 3,
"package_id": 123456,
"identifier": "hyper.host",
"user_id": null,
"platform": "linux",
"enabled": true,
"created_at": "2019-04-26 22:17:19",
"updated_at": "2019-06-06 15:04:11",
"deleted_at": null,
"suspended_at": null,
"migrating": false,
"customers": [
{
"id": 1,
"hyper_host_id": 543211,
"name": "Jack Jones",
"gravatar_url": "https://secure.gravatar.com/avatar/cf6efe3ee2daca55bb2859ea3d72f876?size=512",
"email": "jackjones@example.com",
"created_at": "2019-01-17 20:12:40",
"updated_at": "2019-06-28 10:29:32",
"deleted_at": null
}
],
"reseller": {
"id": 123,
"first_name": "Tony",
"last_name": "James",
"email": "tony@hyper.host",
"photo_url": "https://secure.gravatar.com/avatar/70c384da710ed5464412ce4fcfd0ee53?size=512",
"created_at": "2017-12-21 00:00:00",
"updated_at": "2019-07-05 13:22:14",
}
},
404: Not Found
{
"message": "Resource not found"
}

Example Requests

PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://hyper.host/api/v1/packages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization: Bearer {token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
} ?>

get
SSO

https://hyper.host/api/v1/packages/:package_id/sso
Returns an authenticated session link to access MyCP for the specified package.
Request
Response
Path Parameters
package_id
required
string
You can get this from the list endpoint result
200: OK

Example Requests

PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://hyper.host/api/v1/packages/{packageId}/sso",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization: Bearer {token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
} ?>

post
Store

https://hyper.host/api/v1/packages
Request
Response
Form Data Parameters
hyper_host_id
optional
string
The id for a customer if you want to assign one
platform
required
string
9739 = Linux, 907 = WordPress, 15809 = Windows
domain
required
string
Without the www, for example, domain.com
200: OK

Example Requests

First Tab
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://hyper.host/api/v1/reseller/package",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('platform' => '905','domain' => 'domain.com','hyper_host_id' => '123456'),
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization: Bearer {token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
} ?>

delete
Delete

https://hyper.host/api/v1/packages/:package_id
Delete a hosting package
Request
Response
Path Parameters
package_id
required
string
You can get this from the list endpoint result
200: OK