Vérifier la disponibilité
curl --request GET \
  --url https://kennhosting.com/api/v1/domains/check \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://kennhosting.com/api/v1/domains/check"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://kennhosting.com/api/v1/domains/check', 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://kennhosting.com/api/v1/domains/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://kennhosting.com/api/v1/domains/check"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://kennhosting.com/api/v1/domains/check")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://kennhosting.com/api/v1/domains/check")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
Base URL : /api/v1.

Requête

GET /v1/domains/check?domain=mondomaine.com
Authorization: Bearer kh_live_xxxx

Paramètres de query

ParamètreTypeRequisDescription
domainstringOuiNom de domaine complet (FQDN), en minuscules de préférence
Aucun autre paramètre de query n’est requis : lorsque le domaine est indisponible et que la cause n’est pas un conflit local, l’API calcule et renvoie automatiquement des suggestions formatées côté serveur.

Réponse — Domaine disponible

{
  "success": true,
  "data": {
    "available": true,
    "domain": "mondomaine.com",
    "message": "…",
    "source": "registrar",
    "reason_code": null,
    "quote": {
      "years": 1,
      "premium": false,
      "amount_xaf": 15000,
      "amount_eur": 22.87,
      "currency": "XAF"
    }
  }
}
L’objet quote n’est présent que si le devis registrar a pu être calculé avec succès.

Réponse — Domaine indisponible (exemple)

{
  "success": true,
  "data": {
    "available": false,
    "domain": "busy.com",
    "message": "Ce domaine est déjà pris.",
    "source": "registrar",
    "reason_code": "external_taken",
    "suggestions": [
      {
        "domain": "busy.net",
        "premium": false,
        "amount_xaf": 12000,
        "amount_eur": 18.29
      }
    ]
  }
}
Si reason_code vaut local_conflict, le tableau suggestions est vide.

Timeout registrar

{
  "success": true,
  "data": {
    "available": false,
    "domain": "example.com",
    "message": "…",
    "source": "fallback",
    "reason_code": "timeout",
    "timeout": true
  }
}

Vérification en lot

POST /v1/domains/check-bulk
Content-Type: application/json
{
  "domains": ["monsite.com", "monsite.net"]
}
Réponse : tableau d’objets { "domain": "…", "available": true|false } (ordre aligné sur la requête).
La vérification en lot est limitée à 20 domaines par requête. Cet endpoint fonctionne aussi avec les tokens sandbox (kh_test_).

Permissions requises

domains:read