🚀 Spring sale — 60% off your first year of hosting + free domain.Claim deal
🇺🇸You're in the US — JFK + IAD edges, 78ms to NL core · JFK/IAD edges · ~78msSee DC →
API Documentation

API Reference

Version v1 · stable

Base URL

https://api.cernet.host/v1

Authentication

All calls require a Authorization header:

Authorization: Bearer YOUR_API_KEY

Generate API keys in your control panel under Settings → API.

Example: check domain availability

curl https://api.cernet.host/v1/domains/check?name=example.com \
  -H 'Authorization: Bearer YOUR_API_KEY'
<?php
$ch = curl_init('https://api.cernet.host/v1/domains/check?name=example.com');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);
var_dump($data);
const res = await fetch('https://api.cernet.host/v1/domains/check?name=example.com', {
  headers: { Authorization: 'Bearer YOUR_API_KEY' }
});
const data = await res.json();
console.log(data);
import requests

r = requests.get(
    'https://api.cernet.host/v1/domains/check',
    params={'name': 'example.com'},
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
)
print(r.json())
package main

import (
    "encoding/json"
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://api.cernet.host/v1/domains/check?name=example.com", nil)
    req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    var out map[string]any
    json.NewDecoder(res.Body).Decode(&out)
    fmt.Println(out)
}
require 'net/http'
require 'json'

uri = URI('https://api.cernet.host/v1/domains/check?name=example.com')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = 'Bearer YOUR_API_KEY'
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
puts JSON.parse(res.body)

Response:

{
  "available": true,
  "price": "13.99",
  "currency": "USD",
  "premium": false
}

Example: provision hosting account

curl -X POST https://api.cernet.host/v1/hosting/accounts \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "plan": "web-hosting-business",
    "domain": "example.com",
    "username": "exampleuser",
    "email": "[email protected]"
  }'
<?php
$payload = json_encode([
    'plan'     => 'web-hosting-business',
    'domain'   => 'example.com',
    'username' => 'exampleuser',
    'email'    => '[email protected]',
]);
$ch = curl_init('https://api.cernet.host/v1/hosting/accounts');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => $payload,
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer YOUR_API_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_RETURNTRANSFER => true,
]);
$account = json_decode(curl_exec($ch), true);
const res = await fetch('https://api.cernet.host/v1/hosting/accounts', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    plan: 'web-hosting-business',
    domain: 'example.com',
    username: 'exampleuser',
    email: '[email protected]',
  }),
});
const account = await res.json();
import requests

account = requests.post(
    'https://api.cernet.host/v1/hosting/accounts',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={
        'plan': 'web-hosting-business',
        'domain': 'example.com',
        'username': 'exampleuser',
        'email': '[email protected]',
    },
).json()
payload, _ := json.Marshal(map[string]string{
    "plan":     "web-hosting-business",
    "domain":   "example.com",
    "username": "exampleuser",
    "email":    "[email protected]",
})
req, _ := http.NewRequest("POST", "https://api.cernet.host/v1/hosting/accounts", bytes.NewReader(payload))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
http.DefaultClient.Do(req)

Example: add DNS record

curl -X POST https://api.cernet.host/v1/dns/example.com/records \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"type":"A","name":"@","value":"193.34.103.42","ttl":3600}'
<?php
$record = ['type'=>'A', 'name'=>'@', 'value'=>'193.34.103.42', 'ttl'=>3600];
$ch = curl_init('https://api.cernet.host/v1/dns/example.com/records');
curl_setopt_array($ch, [
    CURLOPT_POST       => true,
    CURLOPT_POSTFIELDS => json_encode($record),
    CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
]);
curl_exec($ch);
await fetch('https://api.cernet.host/v1/dns/example.com/records', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ type: 'A', name: '@', value: '193.34.103.42', ttl: 3600 }),
});

Endpoints (overview)

  • /v1/domains — list, register, transfer, renew
  • /v1/domains/{name}/dns/records — manage DNS
  • /v1/hosting/accounts — provision, list, suspend, terminate
  • /v1/hosting/accounts/{id}/databases — create & manage DBs
  • /v1/email/mailboxes — mailboxes, aliases, forwarders
  • /v1/ssl/certificates — order, deploy, renew
  • /v1/billing/invoices — list, get
  • /v1/webhooks — register webhooks for events

Rate limits

Standard 60 requests/minute. Headers X-RateLimit-Remaining and X-RateLimit-Reset tell you where you stand.

Webhooks

Subscribe to events like domain.registered, hosting.provisioned, invoice.paid, ssl.renewed. Delivered with HMAC-SHA256 signature for verification.

SDKs

  • PHP — composer require cernet/api-client
  • Python — pip install cernet-api
  • Node.js — npm i @cernet/api
  • Go — go get github.com/cernet/cernet-go

Ready to launch?

Domains, hosting and email — set up in minutes.

Get started