Skip to main content
Examples for using the Reseller API are shown below.
You can use Postman to easily test the Reseller API. It lets you quickly validate your requests and move your integration forward smoothly.
Every request must:
  • Use the POST method
  • Send and accept application/json
  • Include your API key in the JSON body as the key field

Example cURL request

curl --location 'https://client.hostrox.net/api/reseller/me' \
  --header 'Content-Type: application/json' \
  --data '{
    "key": "UzZBSlBWeWk0UEcrVWxlU0RjS1B1dz09"
  }'

Example JSON response

{
  "status": "successful",
  "balance": "12921.6200",
  "currency": "USD",
  "balance_formatted": "$12,921.62"
}

More languages

<?php
$ch = curl_init('https://client.hostrox.net/api/reseller/me');

curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Accept: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    'key' => 'YOUR_API_KEY',
]));

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
print_r($data);

Response status

Every response includes a status field. A value of successful indicates the request was handled correctly; any other value indicates an error and the response will include a descriptive message.