Introduction
Our HTTP REST API allows you to manage vital details of your account and services in client portal. JSON is used for all API returns
Use left menu to browse trough available methods, use right menu to check required parameters, data to post and code samples in various languages.
Swagger Doc: You can download or display the JSON to generate documentation in Swagger.
Authentication
JSON Web Token Authentication
curl 'https://mijn.hostbit.nl/api/login' \
-d username="username"\
-d password="password"
# grab authentication token from the response and pass it in Authorization header
curl 'https://mijn.hostbit.nl/api/details' \
-H "Authorization: Bearer $token"
$resp = $client->post('login', [
'form_params' => [
'username' => 'username',
'password' => 'password'
]
]);
$token = $resp->json()['token'];
$resp = $client->get('details', [
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
echo $resp->getBody();
payload = username
resp = requests.post('https://mijn.hostbit.nl/api/login', data=payload)
headers = {
'Authorization': 'Bearer ' + req.json().token
}
resp = requests.get('https://mijn.hostbit.nl/api/details', headers=headers)
print(resp)
Make sure to replace
usernameandpasswordwith your client area details.
To authenticate, you need to send a JSON Web Token (JWT) in the authorization header of the HTTP request.
To obtain the authorization token you need to submit a request with your username and password
to POST https://mijn.hostbit.nl/api/login API method
All API calls that require authentication expect HTTP header in the form of
Authorization: Bearer <token>.
For example:
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc...
Basic Authentication
# pass the correct header with each request (-u option)
curl 'https://mijn.hostbit.nl/api/details' \
-u "username:password"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'auth' => ['username', 'password']
]);
$resp = $client->get('details');
# python requests module handles basic authentication if provided with auth parameter
payload = username
req = requests.get('https://mijn.hostbit.nl/api/details', auth=('username', 'password'))
print(req.json())
Make sure to replace
usernameandpasswordwith your client area details.
This authentication method requires that you send your client area username (email address) and password with each request.
API calls that require authentication expect a header in the form of
Authorization: Basic <credentials>, where credentials is the Base64 encoding
of username and password joined by a single colon :.
For example:
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
You can find more info on this authentication method here: Basic HTTP Authentication
Clientarea
Login
Generate new authorization token
POST_DATA="{
\"username\": \"user@example.com\",
\"password\": \"secret\"
}"
curl -X POST "https://mijn.hostbit.nl/api/login" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
]);
$options = [
'json' => [
"username" => "user@example.com",
"password" => "secret"
]
]
$resp = $client->post('login', $options);
echo $resp->getBody();
payload = {
'username': "user@example.com",
'password': "secret"
}
req = requests.post('https://mijn.hostbit.nl/api/login', json=payload)
print(req.json())
Example Response:
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRw(...)5lZ9T79ft9uwOkqRRmIBbtR51_w",
"expires_at": 1786124959,
"refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIzMD(...)ChwIAb3zvxBu6kvULa2AwAt9U-I",
"refresh_expires_at": 1793897359,
"mfa": null
}
// OR
{
"token": null,
"expires_at": null,
"refresh": null,
"refresh_expires_at": null,
"mfa": {
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRw(...)5lZ9T79ft9uwOkqRRmIBbtR51_w",
"methods": [
"email_mfa"
],
"expires_at": 1786121952
}
}
HTTP Request
POST /login
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| username | string |
Your acount email address |
| password | string |
Account password |
Request MFA
Send code or get initialization data for a selected MFA method. For example, for Email Verification this will send a new code to suer email.
Set your Authorization header to Bearer {{mfa.token}} using data from the POST /login response
POST_DATA="{
\"method\": \"email_mfa\",
\"params\": \"No error\"
}"
curl -X POST "https://mijn.hostbit.nl/api/mfa/challenge" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
]);
$options = [
'json' => [
"method" => "email_mfa",
"params" => "No error"
]
]
$resp = $client->post('mfa/challenge', $options);
echo $resp->getBody();
payload = {
'method': "email_mfa",
'params': "No error"
}
req = requests.post('https://mijn.hostbit.nl/api/mfa/challenge', json=payload)
print(req.json())
Example Response:
{
"expected_payload": {
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "string",
"description": "The code to verify"
}
}
}
}
HTTP Request
POST /mfa/challenge
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| method | string |
The MFA method to use. |
| params | mixed |
Paramtters for specific MFA methods. |
Verify MFA
Receive authentication and refresh tokens after solving the MFA challenge with the user-provided data.
Set your Authorization header to Bearer {{mfa.token}} using data from the POST /login response
POST_DATA="{
\"method\": \"email_mfa\",
\"payload\": {
\"code\": \"123456\"
}
}"
curl -X POST "https://mijn.hostbit.nl/api/mfa/verify" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
]);
$options = [
'json' => [
"method" => "email_mfa",
"payload" => [
"code" => "123456"
]
]
]
$resp = $client->post('mfa/verify', $options);
echo $resp->getBody();
payload = {
'method': "email_mfa",
'payload': {
'code': "123456"
}
}
req = requests.post('https://mijn.hostbit.nl/api/mfa/verify', json=payload)
print(req.json())
Example Response:
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJtZmFA(...)HGCeVZ0-ikvglYi8U41UPAr6G7Q",
"expires_at": 1786125589,
"refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodH(...)UlbKlgssysGnCZXwZ46uD7B4THk",
"refresh_expires_at": 1793897989,
"mfa": null
}
HTTP Request
POST /mfa/verify
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| method | string |
The MFA method to use. |
| payload | mixed |
Data used for MFA method |
Logout
Invalidate authorization token
curl -X POST "https://mijn.hostbit.nl/api/logout" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->post('logout');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://mijn.hostbit.nl/api/logout', headers=headers)
print(req.json())
Example Response:
{
"status": true
}
HTTP Request
POST /logout
Refresh Token
Generate new authorization token using refresh token
POST_DATA="{
\"refresh_token\": \"refresh_tokenValue\"
}"
curl -X POST "https://mijn.hostbit.nl/api/token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
]);
$options = [
'json' => [
"refresh_token" => "refresh_tokenValue"
]
]
$resp = $client->post('token', $options);
echo $resp->getBody();
payload = {
'refresh_token': "refresh_tokenValue"
}
req = requests.post('https://mijn.hostbit.nl/api/token', json=payload)
print(req.json())
Example Response:
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHR(...)vY2xlYiHGvauCWZD9B0VwXgHEzXDllqY",
"refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJBQ(...)Rmivc_u3YA_kgDqOPtUuGNXOzueXYtZw"
}
HTTP Request
POST /token
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| refresh_token | string |
Refresh token previously obtained from |
Get contacts details
Return array with contact details
curl -X GET "https://mijn.hostbit.nl/api/contact/@id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('contact/@id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/contact/@id', headers=headers)
print(req.json())
Example Response:
{
"contact": {
"id": "49",
"email": "mary@example.com",
"firstname": "Mary",
"lastname": "Sue",
"companyname": "",
"address1": "Pretty View Lane",
"address2": "3194",
"city": "Santa Rosa",
"state": "California",
"postcode": "95401",
"country": "US",
"phonenumber": "+1.24123123",
"type": "Private",
"privileges" : {
"support" : ["tickets", "newticket"]
}
}
}
HTTP Request
GET /contact/@id
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Contact ID |
Billing
Invoice Details
Get invoice details
curl -X GET "https://mijn.hostbit.nl/api/invoice/@id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('invoice/@id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/invoice/@id', headers=headers)
print(req.json())
Example Response:
{
"invoice": {
"id": "308976",
"status": "Paid",
"date": "2016-12-30",
"duedate": "2017-01-06",
"paybefore": "2017-01-06",
"datepaid": "2016-12-30 12:40:47",
"subtotal": 16.24,
"credit": 0,
"tax": 3.41,
"taxrate": 21,
"tax2": 0,
"taxrate2": 0,
"taxexempt": "0",
"total": 19.65,
"rate": 1,
"rate2": 0,
"rate3": 1,
"notes": "",
"items": [
{
"id": "12305",
"invoice_id": "308976",
"type": "Other",
"item_id": "0",
"description": "Example Service",
"amount": "15.00",
"taxed": "1",
"qty": "1.00",
"linetotal": "15.00"
},
{
"id": "12309",
"invoice_id": "308976",
"type": "Other",
"item_id": "-2",
"description": "PayPal Payment Fee",
"amount": "1.24",
"taxed": "1",
"qty": "1.00",
"linetotal": "1.24"
}
],
"client": {
"id": "26",
"email": "api@example.com",
"firstname": "Joe",
"lastname": "Doe",
"companyname": "",
"address1": "Pretty View Lane",
"address2": "3194",
"city": "Santa Rosa",
"state": "California",
"postcode": "95401",
"country": "US",
"phonenumber": "+1.24123123"
},
"number": "2016\/12\/1",
"currency": "USD"
}
}
HTTP Request
GET /invoice/@id
Account balance
Get current account balance(unpaid invoices total), account credit
curl -X GET "https://mijn.hostbit.nl/api/balance" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('balance');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/balance', headers=headers)
print(req.json())
Example Response:
{
{
"success": true,
"details": {
"currency": "USD",
"acc_balance": "123456.55",
"acc_credit": "0.00"
}
}
}
HTTP Request
GET /balance
Get Add Funds Information
Get add funds configuration: minimum and maximum deposit amounts and available payment gateways
curl -X GET "https://mijn.hostbit.nl/api/addfunds" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('addfunds');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/addfunds', headers=headers)
print(req.json())
Example Response:
{
"min_amount": 10.00,
"max_amount": 1000.00,
"gateways": [
{"id": 1, "name": "Bank Transfer"},
{"id": 2, "name": "PayPal"}
]
}
HTTP Request
GET /addfunds
Add Funds
Generate add funds invoice
POST_DATA="{
\"amount\": \"100.00\",
\"gateway\": \"gatewayValue\"
}"
curl -X POST "https://mijn.hostbit.nl/api/addfunds" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"amount" => "100.00",
"gateway" => "gatewayValue"
]
]
$resp = $client->post('addfunds', $options);
echo $resp->getBody();
payload = {
'amount': "100.00",
'gateway': "gatewayValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://mijn.hostbit.nl/api/addfunds', json=payload, headers=headers)
print(req.json())
Example Response:
{
"success": true,
"invoice_id": 123
}
HTTP Request
POST /addfunds
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| amount | number |
Amount to add to account |
| gateway | number |
Payment gateway ID, use |
Invoice PDF
Get specific invoice PDF as base64 string
curl -X GET "https://mijn.hostbit.nl/api/invoice/@id/pdf" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('invoice/@id/pdf');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/invoice/@id/pdf', headers=headers)
print(req.json())
HTTP Request
GET /invoice/@id/pdf
Domains
List Domains
List domains under your account
curl -X GET "https://mijn.hostbit.nl/api/domain" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/domain', headers=headers)
print(req.json())
Example Response:
{
"domains": [
{
"id": "47",
"name": "testname.com",
"expires": "2017-12-30",
"recurring_amount": "15.00",
"date_created": "2016-12-30",
"status": "Active",
"period": "1",
"autorenew": "1",
"daytoexpire": "365"
}
]
}
HTTP Request
GET /domain
Domain details
Get domain details
curl -X GET "https://mijn.hostbit.nl/api/domain/@id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/domain/@id', headers=headers)
print(req.json())
Example Response:
{
"details": {
"id": "47",
"name": "testname.com",
"date_created": "2016-12-30",
"firstpayment": "10.00",
"recurring_amount": "15.00",
"period": "1",
"expires": "2017-12-30",
"status": "Active",
"next_due": "2017-12-30",
"next_invoice": "2017-11-30",
"idprotection": "0",
"nameservers": [
"ns1.example.com",
"ns2.example.com",
"ns3.example.com",
"ns4.example.com"
],
"autorenew": "1"
}
}
HTTP Request
GET /domain/@id
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
Domain details by name
Get domain details by name
curl -X GET "https://mijn.hostbit.nl/api/domain/name/@name" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/name/@name');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/domain/name/@name', headers=headers)
print(req.json())
Example Response:
{
"details": [
{
"id": "47",
"name": "testname.com",
"date_created": "2016-12-30",
"firstpayment": "10.00",
"recurring_amount": "15.00",
"period": "1",
"expires": "2017-12-30",
"status": "Active",
"next_due": "2017-12-30",
"next_invoice": "2017-11-30",
"idprotection": "0",
"nameservers": [
"ns1.example.com",
"ns2.example.com",
"ns3.example.com",
"ns4.example.com"
],
"autorenew": "1"
},
{
"id": "48",
"name": "testname.com",
"date_created": "2016-05-30",
"firstpayment": "10.00",
"recurring_amount": "15.00",
"period": "1",
"expires": "2017-05-30",
"status": "Expired",
"next_due": "2017-05-30",
"next_invoice": "2017-04-30",
"idprotection": "0",
"nameservers": [
"ns1.example.com",
"ns2.example.com",
"ns3.example.com",
"ns4.example.com"
],
"autorenew": "1"
},
]
}
HTTP Request
GET /domain/name/@name
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| name | string |
Domain name |
Get domain nameservers
curl -X GET "https://mijn.hostbit.nl/api/domain/@id/ns" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/ns');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/domain/@id/ns', headers=headers)
print(req.json())
HTTP Request
GET /domain/@id/ns
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
Update domain nameservers
Change domain nameservers, if $nameservers is left empty, default namesevers will be used
POST_DATA="{
\"id\": \"idValue\",
\"nameservers\": \"nameserversValue\"
}"
curl -X PUT "https://mijn.hostbit.nl/api/domain/@id/ns" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"id" => "idValue",
"nameservers" => "nameserversValue"
]
]
$resp = $client->put('domain/@id/ns', $options);
echo $resp->getBody();
payload = {
'id': "idValue",
'nameservers': "nameserversValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://mijn.hostbit.nl/api/domain/@id/ns', json=payload, headers=headers)
print(req.json())
Example Response:
{
"info": [
"success_changes_save"
]
}
HTTP Request
PUT /domain/@id/ns
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
| nameservers | array |
List of nameservers to use |
Get registered nameservers
List registered private/glue nameservers for a domain. Note: Not all domain registrar modules support returning registered nameservers. If the module does not support this feature, an empty list may be returned.
curl -X GET "https://mijn.hostbit.nl/api/domain/@id/reg" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/reg');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/domain/@id/reg', headers=headers)
print(req.json())
HTTP Request
GET /domain/@id/reg
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
Register domain nameservers
Manage private/glue nameservers for a domain. Use the action parameter to select the operation:
registerNameServer– register a new glue record (requiresnameserver+ip)modifyNameServer– update the IP of an existing glue record (requiresnameserver+oldip+newip)deleteNameServer– remove a glue record (requiresnameserver)
POST_DATA="{
\"id\": \"idValue\",
\"action\": \"registerNameServer\",
\"nameserver\": \"ns1.yourdomain.com\",
\"ip\": \"1.2.3.4\",
\"oldip\": \"1.2.3.4\",
\"newip\": \"5.6.7.8\"
}"
curl -X POST "https://mijn.hostbit.nl/api/domain/@id/reg" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"id" => "idValue",
"action" => "registerNameServer",
"nameserver" => "ns1.yourdomain.com",
"ip" => "1.2.3.4",
"oldip" => "1.2.3.4",
"newip" => "5.6.7.8"
]
]
$resp = $client->post('domain/@id/reg', $options);
echo $resp->getBody();
payload = {
'id': "idValue",
'action': "registerNameServer",
'nameserver': "ns1.yourdomain.com",
'ip': "1.2.3.4",
'oldip': "1.2.3.4",
'newip': "5.6.7.8"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://mijn.hostbit.nl/api/domain/@id/reg', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /domain/@id/reg
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
| action | string |
Operation: registerNameServer, modifyNameServer, deleteNameServer |
| nameserver | string |
Full nameserver hostname |
| ip | string |
IP address for the nameserver – required for registerNameServer |
| oldip | string |
Current IP address – required for modifyNameServer |
| newip | string |
New IP address – required for modifyNameServer |
DNS Records DNS Records
List DNS records
curl -X GET "https://mijn.hostbit.nl/api/domain/@id/dns" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/dns');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/domain/@id/dns', headers=headers)
print(req.json())
Example Response:
{
"records": [
{
"id": 1,
"name": "test",
"ttl": 0,
"priority": 0,
"type": "A",
"content": "100.100.10.1"
}
]
}
HTTP Request
GET /domain/@id/dns
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
Create DNS Records
Add a new DNS record
POST_DATA="{
\"id\": \"idValue\",
\"name\": \"nameValue\",
\"type\": \"typeValue\",
\"priority\": \"priorityValue\",
\"content\": \"contentValue\"
}"
curl -X POST "https://mijn.hostbit.nl/api/domain/@id/dns" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"id" => "idValue",
"name" => "nameValue",
"type" => "typeValue",
"priority" => "priorityValue",
"content" => "contentValue"
]
]
$resp = $client->post('domain/@id/dns', $options);
echo $resp->getBody();
payload = {
'id': "idValue",
'name': "nameValue",
'type': "typeValue",
'priority': "priorityValue",
'content': "contentValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://mijn.hostbit.nl/api/domain/@id/dns', json=payload, headers=headers)
print(req.json())
Example Response:
{
"info": [
"DNS Management updated successfully"
]
}
HTTP Request
POST /domain/@id/dns
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
| name | string |
Reord name |
| type | string |
Reord type |
| priority | string |
Reord priority |
| content | string |
Reord content eg. IP addres for A records |
Update DNS Records
Change a DNS record
POST_DATA="{
\"id\": \"idValue\",
\"record_id\": \"record_idValue\",
\"name\": \"nameValue\",
\"type\": \"typeValue\",
\"priority\": \"priorityValue\",
\"content\": \"contentValue\"
}"
curl -X PUT "https://mijn.hostbit.nl/api/domain/@id/dns/@index" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"id" => "idValue",
"record_id" => "record_idValue",
"name" => "nameValue",
"type" => "typeValue",
"priority" => "priorityValue",
"content" => "contentValue"
]
]
$resp = $client->put('domain/@id/dns/@index', $options);
echo $resp->getBody();
payload = {
'id': "idValue",
'record_id': "record_idValue",
'name': "nameValue",
'type': "typeValue",
'priority': "priorityValue",
'content': "contentValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://mijn.hostbit.nl/api/domain/@id/dns/@index', json=payload, headers=headers)
print(req.json())
Example Response:
{
"info": [
"DNS Management updated successfully"
]
}
HTTP Request
PUT /domain/@id/dns/@index
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
| record_id | int |
Recod index |
| name | string |
Record name |
| type | string |
Record type |
| priority | string |
Record priority |
| content | string |
Record content eg. IP address for A records |
Remove DNS Records
Remove a DNS record
curl -X DELETE "https://mijn.hostbit.nl/api/domain/@id/dns/@index" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->delete('domain/@id/dns/@index');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.delete('https://mijn.hostbit.nl/api/domain/@id/dns/@index', headers=headers)
print(req.json())
Example Response:
{
"info": [
"DNS Management updated successfully"
]
}
HTTP Request
DELETE /domain/@id/dns/@index
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
| record_id | int |
Recod index |
DNS Records Types
List supported records type
curl -X GET "https://mijn.hostbit.nl/api/domain/@id/dns/types" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/dns/types');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/domain/@id/dns/types', headers=headers)
print(req.json())
Example Response:
{
"types": [
"A",
"CNAME",
"URL",
"FRAME",
"MX",
"MXE",
"TXT"
]
}
HTTP Request
GET /domain/@id/dns/types
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
Synchronize domain
curl -X GET "https://mijn.hostbit.nl/api/domain/@id/sync" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/sync');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/domain/@id/sync', headers=headers)
print(req.json())
HTTP Request
GET /domain/@id/sync
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
Get domain contact info
curl -X GET "https://mijn.hostbit.nl/api/domain/@id/contact" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/contact');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/domain/@id/contact', headers=headers)
print(req.json())
Example Response:
{
"success": true,
"domain_id": "428",
"contact_info": {
"registrant": {
"firstname": "",
"lastname": "",
"companyname": "",
"email": "",
"phonenumber": "",
"address1": "",
"address2": "",
"city": "",
"state": "",
"postcode": "",
"country": ""
},
"tech": {
"firstname": "",
"lastname": "",
"companyname": "",
"email": "",
"phonenumber": "",
"address1": "",
"address2": "",
"city": "",
"state": "",
"postcode": "",
"country": ""
},
"admin": {
"firstname": "",
"lastname": "",
"companyname": "",
"email": "",
"phonenumber": "",
"address1": "",
"address2": "",
"city": "",
"state": "",
"postcode": "",
"country": ""
},
"billing": {
"firstname": "",
"lastname": "",
"companyname": "",
"email": "",
"phonenumber": "",
"address1": "",
"address2": "",
"city": "",
"state": "",
"postcode": "",
"country": ""
}
}
}
HTTP Request
GET /domain/@id/contact
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
Update domain contact info
POST_DATA="{
\"id\": \"idValue\",
\"contact_info\": \"contact_infoValue\"
}"
curl -X PUT "https://mijn.hostbit.nl/api/domain/@id/contact" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"id" => "idValue",
"contact_info" => "contact_infoValue"
]
]
$resp = $client->put('domain/@id/contact', $options);
echo $resp->getBody();
payload = {
'id': "idValue",
'contact_info': "contact_infoValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://mijn.hostbit.nl/api/domain/@id/contact', json=payload, headers=headers)
print(req.json())
Example Response:
{
"success": true,
"domain_id": "428",
"info": [
"request_contacts_sent"
]
}
HTTP Request
PUT /domain/@id/contact
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
| contact_info | array |
Get domain autorenew
curl -X GET "https://mijn.hostbit.nl/api/domain/@id/autorenew" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/autorenew');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/domain/@id/autorenew', headers=headers)
print(req.json())
Example Response:
{
"success": true,
"autorenew": null
}
HTTP Request
GET /domain/@id/autorenew
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
Enable/disable domain autorenew
POST_DATA="{
\"id\": \"idValue\",
\"autorenew\": \"autorenewValue\"
}"
curl -X PUT "https://mijn.hostbit.nl/api/domain/@id/autorenew" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"id" => "idValue",
"autorenew" => "autorenewValue"
]
]
$resp = $client->put('domain/@id/autorenew', $options);
echo $resp->getBody();
payload = {
'id': "idValue",
'autorenew': "autorenewValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://mijn.hostbit.nl/api/domain/@id/autorenew', json=payload, headers=headers)
print(req.json())
Example Response:
{
"success": true,
"info": [
"success_changes_save"
]
}
HTTP Request
PUT /domain/@id/autorenew
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
| autorenew | bool |
Returns the available flags
curl -X GET "https://mijn.hostbit.nl/api/domain/@id/dnssec/flags" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/dnssec/flags');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/domain/@id/dnssec/flags', headers=headers)
print(req.json())
HTTP Request
GET /domain/@id/dnssec/flags
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
Returns the list of DNSSEC keys
curl -X GET "https://mijn.hostbit.nl/api/domain/@id/dnssec" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/@id/dnssec');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/domain/@id/dnssec', headers=headers)
print(req.json())
HTTP Request
GET /domain/@id/dnssec
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
Adds the DNSSEC key
POST_DATA="{
\"id\": \"idValue\"
}"
curl -X PUT "https://mijn.hostbit.nl/api/domain/@id/dnssec" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"id" => "idValue"
]
]
$resp = $client->put('domain/@id/dnssec', $options);
echo $resp->getBody();
payload = {
'id': "idValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://mijn.hostbit.nl/api/domain/@id/dnssec', json=payload, headers=headers)
print(req.json())
HTTP Request
PUT /domain/@id/dnssec
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
curl -X DELETE "https://mijn.hostbit.nl/api/domain/@id/dnssec/@key" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->delete('domain/@id/dnssec/@key');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.delete('https://mijn.hostbit.nl/api/domain/@id/dnssec/@key', headers=headers)
print(req.json())
HTTP Request
DELETE /domain/@id/dnssec/@key
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| id | int |
Domain id |
Domain availability
Check if domain is available for registration. Returns status: "ok" if domain is available, empty response otherwise
POST_DATA="{
\"name\": \"example.com\"
}"
curl -X POST "https://mijn.hostbit.nl/api/domain/lookup" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"name" => "example.com"
]
]
$resp = $client->post('domain/lookup', $options);
echo $resp->getBody();
payload = {
'name': "example.com"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://mijn.hostbit.nl/api/domain/lookup', json=payload, headers=headers)
print(req.json())
Example Response:
{
"available": false,
"name": "example.com",
"premium": false,
"periods": [
{
"id": "6",
"period": "1",
"register": "10.00",
"transfer": "0.00",
"renew": "15.00",
"redemption": "40.00"
},
{
"id": "6",
"period": "2",
"register": "20.00",
"transfer": "20.00",
"renew": "20.00",
"redemption": "80.00"
}
]
}
HTTP Request
POST /domain/lookup
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| name | string |
Domain name |
Available TLDs
List TLDs available for registration and transfer
curl -X GET "https://mijn.hostbit.nl/api/domain/order" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/order');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/domain/order', headers=headers)
print(req.json())
Example Response:
{
"tlds": [
{
"id": "6",
"tld": ".com",
"periods": [
{
"period": "1",
"register": "10.00",
"transfer": "0.00",
"renew": "15.00",
"redemption": "40.00"
},
{
"period": "2",
"register": "20.00",
"transfer": "20.00",
"renew": "30.00",
"redemption": "80.00"
}
]
},
(...)
]
}
HTTP Request
GET /domain/order
Additinal data for TLD
Get additional forms required for some TLDs
curl -X GET "https://mijn.hostbit.nl/api/domain/order/@id/form" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('domain/order/@id/form');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/domain/order/@id/form', headers=headers)
print(req.json())
Example Response:
{
"forms": [
{
"type": "domaindnssupport",
"title": "DNS Management",
"id": "1424",
"firstItemId": 9067,
"description": "",
"name": "custom[1424][9067]",
"required": false,
"multiple": false,
"config": {
"enableddefault": 0
},
"value": [],
"textvalue": [],
"price": 0,
"recurring_price": 0,
"setup": 0,
"prorata_date": null,
"items": [
{
"title": "",
"value": 1,
"id": 9067,
"price": 4,
"setup": 0,
"selected": false
}
]
},
{
"type": "select",
"title": "Language",
"id": "1755",
"firstItemId": 10952,
"description": "",
"name": "custom[1755]",
"required": false,
"multiple": false,
"config": {
"conditionals": []
},
"value": [],
"textvalue": [],
"price": 0,
"recurring_price": 0,
"setup": 0,
"prorata_date": null,
"items": [
{
"title": "AFR",
"value": 1,
"id": 10952,
"price": 0,
"setup": 0,
"selected": false
},
{
"title": "ALB",
"value": 1,
"id": 10953,
"price": 0,
"setup": 0,
"selected": false
},
(...)
]
}
]
}
HTTP Request
GET /domain/order/@id/form
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| tld_id | int |
TLD ID |
Order new domain
Create new order for a domain, please check if requested domain is available first, otherwise your order may get cancelled.
POST_DATA="{
\"name\": \"example.com\",
\"years\": 1,
\"action\": \"register\",
\"tld_id\": 42,
\"pay_method\": 5,
\"epp\": \"Syntax error\",
\"nameservers\": [
\"ns1.example.com\",
{
\"host\": \"ns2.example.com\",
\"ip\": \"123.234.123.234\"
}
],
\"registrant\": 42,
\"admin\": 43,
\"tech\": 43,
\"billing\": 42,
\"data\": {
\"1618\": {
\"10330\": \"bar\"
}
},
\"aff_id\": 55
}"
curl -X POST "https://mijn.hostbit.nl/api/domain/order" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"name" => "example.com",
"years" => 1,
"action" => "register",
"tld_id" => 42,
"pay_method" => 5,
"epp" => "Syntax error",
"nameservers" => [
"ns1.example.com",
[
"host" => "ns2.example.com",
"ip" => "123.234.123.234"
]
],
"registrant" => 42,
"admin" => 43,
"tech" => 43,
"billing" => 42,
"data" => [
1618 => [
10330 => "bar"
]
],
"aff_id" => 55
]
]
$resp = $client->post('domain/order', $options);
echo $resp->getBody();
payload = {
'name': "example.com",
'years': 1,
'action': "register",
'tld_id': 42,
'pay_method': 5,
'epp': "Syntax error",
'nameservers': [
"ns1.example.com",
{
'host': "ns2.example.com",
'ip': "123.234.123.234"
}
],
'registrant': 42,
'admin': 43,
'tech': 43,
'billing': 42,
'data': {
'1618': {
'10330': "bar"
}
},
'aff_id': 55
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://mijn.hostbit.nl/api/domain/order', json=payload, headers=headers)
print(req.json())
Example Response:
{
"order_num": 563647679,
"invoice_id": "308977",
"total": "10.00",
"items": {
"id": "10",
"type": "Domain Register",
"name": "test.com",
"product_id": "3"
}
}
HTTP Request
POST /domain/order
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| name | string |
Domain name |
| years | string |
Number of years |
| action | string |
register|transfer |
| tld_id | string |
TLD id |
| pay_method | int |
Payment method ID |
| epp | string |
EPP Transfer code, required when transfering some domains |
| nameservers | array |
Optional array with 2 - 4 nameservers that you want to use |
| registrant | int |
Optional contact ID to use for registrant contact this domain |
| admin | int |
Optional contact ID to use for admin contact this domain |
| tech | int |
Optional contact ID to use for tech contact this domain |
| billing | int |
Optional contact ID to use for billing contact this domain |
| data | array |
Addditional data required for some TLDs |
| aff_id | int |
Affiliate ID |
Renew domain
Create new renew order for a domain, please check if requested domain is available first, otherwise your order may get cancelled.
POST_DATA="{
\"years\": \"yearsValue\",
\"pay_method\": \"pay_methodValue\"
}"
curl -X POST "https://mijn.hostbit.nl/api/domain/@id/renew" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"years" => "yearsValue",
"pay_method" => "pay_methodValue"
]
]
$resp = $client->post('domain/@id/renew', $options);
echo $resp->getBody();
payload = {
'years': "yearsValue",
'pay_method': "pay_methodValue"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://mijn.hostbit.nl/api/domain/@id/renew', json=payload, headers=headers)
print(req.json())
HTTP Request
POST /domain/@id/renew
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| years | string |
Number of years |
| pay_method | int |
Payment method ID |
DNS
List DNS
Returns a list of all DNS
curl -X GET "https://mijn.hostbit.nl/api/dns" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('dns');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/dns', headers=headers)
print(req.json())
Example Response:
{
"service_ids": [
"10",
"20"
],
"zones": [
{
"domain_id": "60",
"name": "qwerty.com",
"service_id": "10"
},
{
"domain_id": "61",
"name": "bgg12ooble.com",
"service_id": "20"
}
]
}
HTTP Request
GET /dns
Add DNS Zone
Creates a new DNS zone
POST_DATA="{
\"service_id\": \"service_idValue\",
\"name\": \"testzone.com\",
\"comment\": \"My zone comment\"
}"
curl -X POST "https://mijn.hostbit.nl/api/service/@service_id/dns" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"service_id" => "service_idValue",
"name" => "testzone.com",
"comment" => "My zone comment"
]
]
$resp = $client->post('service/@service_id/dns', $options);
echo $resp->getBody();
payload = {
'service_id': "service_idValue",
'name': "testzone.com",
'comment': "My zone comment"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://mijn.hostbit.nl/api/service/@service_id/dns', json=payload, headers=headers)
print(req.json())
Example Response:
{
"info": [
"Domain zone testzone.com was created successfully."
]
}
HTTP Request
POST /service/@service_id/dns
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| service_id | int |
Service ID |
| name | string |
Zone name |
| comment | string |
Zone comment |
List DNS for service
Returns a list of DNS zones under the service
curl -X GET "https://mijn.hostbit.nl/api/service/@service_id/dns" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@service_id/dns');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/service/@service_id/dns', headers=headers)
print(req.json())
Example Response:
{
"error": [
"invalid method"
]
}
HTTP Request
GET /service/@service_id/dns
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| service_id | int |
Service ID |
Get DNS details
Returns details of the DNS zone
curl -X GET "https://mijn.hostbit.nl/api/service/@service_id/dns/@zone_id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('service/@service_id/dns/@zone_id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/service/@service_id/dns/@zone_id', headers=headers)
print(req.json())
Example Response:
{
"service_id": 10,
"name": "qwerty.com",
"comment": "My zone comment",
"records": [
{
"id":"10",
"name":"qwerty",
"ttl":1800,
"priority":0,
"content":"127.0.0.1",
"type":"A"
},
{
"id":"11",
"name":"qwerty",
"ttl":1800,
"priority":0,
"content":"ns1.qwerty.com",
"type":"NS"
}
]
}
HTTP Request
GET /service/@service_id/dns/@zone_id
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| service_id | int |
Service ID |
| zone_id | int |
Zone ID |
Edit DNS Zone
Updates the comment of the selected DNS zone
POST_DATA="{
\"service_id\": \"service_idValue\",
\"zone_id\": \"zone_idValue\",
\"comment\": \"My zone comment\"
}"
curl -X PUT "https://mijn.hostbit.nl/api/service/@service_id/dns/@zone_id" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"service_id" => "service_idValue",
"zone_id" => "zone_idValue",
"comment" => "My zone comment"
]
]);
$resp = $client->put('service/@service_id/dns/@zone_id', $options);
echo $resp->getBody();
payload = {
'service_id': "service_idValue",
'zone_id': "zone_idValue",
'comment': "My zone comment"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://mijn.hostbit.nl/api/service/@service_id/dns/@zone_id', json=payload, headers=headers)
print(req.json())
Example Response:
{
"success": true,
"info": [
"Domain zone updated successfully."
]
}
HTTP Request
PUT /service/@service_id/dns/@zone_id
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| service_id | int |
Service ID |
| zone_id | int |
Zone ID |
| comment | string |
Zone comment |
Remove DNS zone
Deletes the selected DNS zone
curl -X DELETE "https://mijn.hostbit.nl/api/service/@service_id/dns/@zone_id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->delete('service/@service_id/dns/@zone_id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.delete('https://mijn.hostbit.nl/api/service/@service_id/dns/@zone_id', headers=headers)
print(req.json())
Example Response:
{
"info": [
"Domain zone testzone.com was deleted successfully."
]
}
HTTP Request
DELETE /service/@service_id/dns/@zone_id
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| service_id | int |
Service ID |
| zone_id | int |
Zone ID |
Add DNS Record
Creates a new record in the DNS zone
POST_DATA="{
\"service_id\": \"service_idValue\",
\"zone_id\": \"zone_idValue\",
\"name\": \"example.com\",
\"ttl\": 3600,
\"priority\": 10,
\"type\": \"A\",
\"content\": \"192.168.1.2\"
}"
# OR ...
POST_DATA="{
\"service_id\": \"service_idValue\",
\"zone_id\": \"zone_idValue\",
\"name\": \"_sip._tcp.example.com\",
\"ttl\": 3600,
\"priority\": 10,
\"type\": \"SRV\",
\"content\": [
10,
5060,
\"vc01.example.com\"
]
}"
curl -X POST "https://mijn.hostbit.nl/api/service/@service_id/dns/@zone_id/records" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"service_id" => "service_idValue",
"zone_id" => "zone_idValue",
"name" => "example.com",
"ttl" => 3600,
"priority" => 10,
"type" => "A",
"content" => "192.168.1.2"
]
]);
// OR ...
$options = [
'json' => [
"service_id" => "service_idValue",
"zone_id" => "zone_idValue",
"name" => "_sip._tcp.example.com",
"ttl" => 3600,
"priority" => 10,
"type" => "SRV",
"content" => [
10,
5060,
"vc01.example.com"
]
]
]);
$resp = $client->post('service/@service_id/dns/@zone_id/records', $options);
echo $resp->getBody();
payload = {
'service_id': "service_idValue",
'zone_id': "zone_idValue",
'name': "example.com",
'ttl': 3600,
'priority': 10,
'type': "A",
'content': "192.168.1.2"
}
# OR ...
payload = {
'service_id': "service_idValue",
'zone_id': "zone_idValue",
'name': "_sip._tcp.example.com",
'ttl': 3600,
'priority': 10,
'type': "SRV",
'content': [
10,
5060,
"vc01.example.com"
]
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.post('https://mijn.hostbit.nl/api/service/@service_id/dns/@zone_id/records', json=payload, headers=headers)
print(req.json())
Example Response:
{
"record": {
"name": "_sip._tcp.example.com",
"type": "SRV",
"ttl": "3600",
"priority": "10",
"content": [
10,
5060,
"vc01.example.com"
]
},
"info": [
"dnsnewrecordadded",
"SRV"
]
}
HTTP Request
POST /service/@service_id/dns/@zone_id/records
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| service_id | int |
Service ID |
| zone_id | int |
Zone ID |
| name | string |
Record name |
| ttl | int |
Record ttl |
| priority | int |
Priority of the record |
| type | string |
Record type |
| content | string |
Contents of the record |
Edit DNS Record
Edits the selected DNS zone record.
Note: Depending on the service, updating a record may change its ID. If you need to edit the same record again, re-list the zone records first to obtain its current ID.
POST_DATA="{
\"service_id\": \"service_idValue\",
\"zone_id\": \"zone_idValue\",
\"record_id\": \"record_idValue\",
\"name\": \"example.com\",
\"ttl\": 3600,
\"priority\": 10,
\"type\": \"A\",
\"content\": \"192.168.1.2\"
}"
curl -X PUT "https://mijn.hostbit.nl/api/service/@service_id/dns/@zone_id/records/@record_id" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "${POST_DATA}"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$options = [
'json' => [
"service_id" => "service_idValue",
"zone_id" => "zone_idValue",
"record_id" => "record_idValue",
"name" => "example.com",
"ttl" => 3600,
"priority" => 10,
"type" => "A",
"content" => "192.168.1.2"
]
]
$resp = $client->put('service/@service_id/dns/@zone_id/records/@record_id', $options);
echo $resp->getBody();
payload = {
'service_id': "service_idValue",
'zone_id': "zone_idValue",
'record_id': "record_idValue",
'name': "example.com",
'ttl': 3600,
'priority': 10,
'type': "A",
'content': "192.168.1.2"
}
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.put('https://mijn.hostbit.nl/api/service/@service_id/dns/@zone_id/records/@record_id', json=payload, headers=headers)
print(req.json())
Example Response:
{
"record": {
"id": "55",
"type": "A",
"ttl": "3600",
"name": "test",
"priority": 0,
"content": "192.168.1.2"
},
"info": [
"The record was updated successfully."
]
}
HTTP Request
PUT /service/@service_id/dns/@zone_id/records/@record_id
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| service_id | int |
Service ID |
| zone_id | int |
Zone ID |
| record_id | string |
Record ID |
| name | string |
Record name |
| ttl | int |
Record ttl |
| priority | int |
Priority of the record |
| type | string |
Record type |
| content | string |
Contents of the record |
Remove DNS Record
Removes the selected DNS zone record
curl -X DELETE "https://mijn.hostbit.nl/api/service/@service_id/dns/@zone_id/records/@record_id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->delete('service/@service_id/dns/@zone_id/records/@record_id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.delete('https://mijn.hostbit.nl/api/service/@service_id/dns/@zone_id/records/@record_id', headers=headers)
print(req.json())
HTTP Request
DELETE /service/@service_id/dns/@zone_id/records/@record_id
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| service_id | int |
Service ID |
| zone_id | int |
Zone ID |
| record_id | int |
Record ID |
Support
Get knowledgebase article
Returns an article details
curl -X GET "https://mijn.hostbit.nl/api/knowledgebase/article/@article_id" \
-H "Authorization: Bearer $token"
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://mijn.hostbit.nl/api/',
'headers' => [
'Authorization' => 'Bearer ' . $token
]
]);
$resp = $client->get('knowledgebase/article/@article_id');
echo $resp->getBody();
headers = {
'Authorization': 'Bearer ' + token
}
req = requests.get('https://mijn.hostbit.nl/api/knowledgebase/article/@article_id', headers=headers)
print(req.json())
HTTP Request
GET /knowledgebase/article/@article_id