Run Test on Custom Server
curl --request POST \
--url https://api.hixbe.com/speedtest/custom \
--header 'Content-Type: application/json' \
--header 'Xerobi-Version: <xerobi-version>' \
--data '{
"serverId": 1
}'import requests
url = "https://api.hixbe.com/speedtest/custom"
payload = { "serverId": 1 }
headers = {
"Xerobi-Version": "<xerobi-version>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Xerobi-Version': '<xerobi-version>', 'Content-Type': 'application/json'},
body: JSON.stringify({serverId: 1})
};
fetch('https://api.hixbe.com/speedtest/custom', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hixbe.com/speedtest/custom",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'serverId' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Xerobi-Version: <xerobi-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hixbe.com/speedtest/custom"
payload := strings.NewReader("{\n \"serverId\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Xerobi-Version", "<xerobi-version>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hixbe.com/speedtest/custom")
.header("Xerobi-Version", "<xerobi-version>")
.header("Content-Type", "application/json")
.body("{\n \"serverId\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hixbe.com/speedtest/custom")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Xerobi-Version"] = '<xerobi-version>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"serverId\": 1\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"timestamp": "2023-11-07T05:31:56Z",
"data": {
"id": 10,
"ping": {
"value": 123,
"unit": "<string>"
},
"download": {
"value": 123,
"unit": "<string>"
},
"upload": {
"value": 123,
"unit": "<string>"
},
"qualityScore": {
"value": 50,
"maxScore": 100,
"rating": "Excellent"
},
"jitter": {
"value": 123,
"unit": "<string>"
},
"packetLoss": {
"value": 50,
"unit": "%"
},
"geo": {
"country": "<string>",
"region": "<string>",
"city": "<string>",
"latitude": 123,
"longitude": 123
},
"connectionType": "Fiber",
"isp": "Xerobi Fiber"
},
"executionTime": "<string>"
}{
"success": false,
"timestamp": "2025-12-07T10:30:00.000Z",
"error": {
"code": "invalid_request",
"message": "serverId is required",
"type": "ValidationError"
}
}{
"success": false,
"timestamp": "2025-12-07T10:30:00.000Z",
"error": {
"code": "not_found",
"message": "Server with ID 999 not found",
"type": "NotFoundError"
}
}Custom Speed Test
Runs a full speed test against a specific test server.
Use Cases:
- Test performance to specific regions
- Compare different server locations
- Validate network routing
- Geographic performance testing
Note: Server must be available (check /servers endpoint first).
POST
/
custom
Run Test on Custom Server
curl --request POST \
--url https://api.hixbe.com/speedtest/custom \
--header 'Content-Type: application/json' \
--header 'Xerobi-Version: <xerobi-version>' \
--data '{
"serverId": 1
}'import requests
url = "https://api.hixbe.com/speedtest/custom"
payload = { "serverId": 1 }
headers = {
"Xerobi-Version": "<xerobi-version>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Xerobi-Version': '<xerobi-version>', 'Content-Type': 'application/json'},
body: JSON.stringify({serverId: 1})
};
fetch('https://api.hixbe.com/speedtest/custom', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hixbe.com/speedtest/custom",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'serverId' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Xerobi-Version: <xerobi-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hixbe.com/speedtest/custom"
payload := strings.NewReader("{\n \"serverId\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Xerobi-Version", "<xerobi-version>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hixbe.com/speedtest/custom")
.header("Xerobi-Version", "<xerobi-version>")
.header("Content-Type", "application/json")
.body("{\n \"serverId\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hixbe.com/speedtest/custom")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Xerobi-Version"] = '<xerobi-version>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"serverId\": 1\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"timestamp": "2023-11-07T05:31:56Z",
"data": {
"id": 10,
"ping": {
"value": 123,
"unit": "<string>"
},
"download": {
"value": 123,
"unit": "<string>"
},
"upload": {
"value": 123,
"unit": "<string>"
},
"qualityScore": {
"value": 50,
"maxScore": 100,
"rating": "Excellent"
},
"jitter": {
"value": 123,
"unit": "<string>"
},
"packetLoss": {
"value": 50,
"unit": "%"
},
"geo": {
"country": "<string>",
"region": "<string>",
"city": "<string>",
"latitude": 123,
"longitude": 123
},
"connectionType": "Fiber",
"isp": "Xerobi Fiber"
},
"executionTime": "<string>"
}{
"success": false,
"timestamp": "2025-12-07T10:30:00.000Z",
"error": {
"code": "invalid_request",
"message": "serverId is required",
"type": "ValidationError"
}
}{
"success": false,
"timestamp": "2025-12-07T10:30:00.000Z",
"error": {
"code": "not_found",
"message": "Server with ID 999 not found",
"type": "NotFoundError"
}
}Executes a custom speed test with user-defined parameters and test options.
Headers
API version header. Required for all endpoints except / and /health
Pattern:
^\d+\.\d+\.\d+$Example:
"2.0.0"
Body
application/json
ID of the test server to use
Required range:
x >= 1Example:
1