code Documentation développeur

Bâtissez des fonctions registraire, SSL et hébergement en heures, pas en semaines.

Une seule API REST à /api/v1 pour l'enregistrement de domaines accrédités ICANN, les certificats SSL DV/OV/EV/caractère générique et l'hébergement DirectAdmin. Authentification Bearer. Enveloppe JSON. Webhooks signés. Vos clients restent sur votre plateforme — nous gérons l'infrastructure.

download Télécharger la collection Postman description Spécification OpenAPI 3.0 vpn_key Générez votre première clé
Pourquoi une API

Cinq choses qui demandent du vrai génie, prêtes à appeler.

language

500+ TLD

Enregistrer, transférer, renouveler, verrouiller, mettre à jour WHOIS. EPP / authcodes pris en charge.

verified

SSL à la demande

DV, OV, EV, caractère générique. Les défis ACME et l'orchestration des AC sont chez nous.

dns

DNS anycast

A, AAAA, CNAME, MX, TXT, NS, SRV, CAA. CRUD avec contrôles TTL.

dvr

Hébergement géré

Hébergement partagé DirectAdmin. Provisionner, suspendre, faire pivoter, usage facturable.

cell_tower

Webhooks signés

HMAC-SHA256, relance exponentielle, aucun événement manqué.

1. Authentification

Clés Bearer. Préfixe visible. Affichée une seule fois.

Générez une clé dans le tableau de bord Partenaire API — le texte en clair s'affiche une seule fois. Le préfixe (ex. gg_live_pk_aBCd) peut figurer dans les journaux; le secret complet, non. Révoquez en tout temps; les clients utilisant une clé révoquée reçoivent 401 immédiatement.

# Vérification rapide de votre clé
curl https://gigaglobe.com/api/v1/me \
  -H "Authorization: Bearer gg_live_pk_YOUR_32_CHAR_SUFFIX"
2. Enveloppe de réponse

Même format JSON sur chaque point d'accès.

Ressource unique
{
  "data": {
    "object": "domain",
    "id":     "dom_42",
    "name":   "acmecorp.com",
    ...
  },
  "meta": { "request_id": "abc123" }
}
Listes
{
  "data":     [ {...}, {...} ],
  "total":    142,
  "has_more": true,
  "meta":     { "request_id": "abc123" }
}
Erreurs
{
  "error": {
    "type":    "invalid_request_error",
    "code":    "not_found",
    "message": "Domain not found.",
    "param":   "domain"
  },
  "meta": { "request_id": "abc123" }
}

Chaque réponse contient également X-Request-Id. Citez-le lors d'un appel au soutien.

3. Essayez maintenant

Trois exemples cURL réels.

Enregistrer un domaine

curl https://gigaglobe.com/api/v1/domains \
  -H "Authorization: Bearer $GG_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name":        "acmecorp.com",
    "customer_id": "cust_42abc",
    "years":       2,
    "nameservers": ["ns1.gigaglobe.com","ns2.gigaglobe.com"]
  }'

Émettre un certificat DV

curl https://gigaglobe.com/api/v1/ssl \
  -H "Authorization: Bearer $GG_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "common_name": "app.acmecorp.com",
    "cert_type":   "dv",
    "customer_id": "cust_42abc",
    "san_names":   ["www.app.acmecorp.com"]
  }'

S'abonner à des événements webhook

curl https://gigaglobe.com/api/v1/webhooks \
  -H "Authorization: Bearer $GG_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://your.app/webhook", "events": ["domain.*","ssl.issued"] }'
4. Vérification de signature webhook

HMAC-SHA256, horodaté, sans rejeu.

Chaque livraison contient :
X-GigaGlobe-Signature: t=<unix>,v1=<hex>
X-GigaGlobe-Event: domain.registered
X-GigaGlobe-Delivery: dlv_…

Vérifiez en calculant HMAC_SHA256(secret, "{t}.{raw_body}") et en le comparant en temps constant à v1. Rejetez si |now - t| > 300s.

Node.js
const crypto = require('crypto');
const sig = req.headers['x-gigaglobe-signature'];
const parts = Object.fromEntries(
  sig.split(',').map(s => s.split('='))
);
const expected = crypto.createHmac('sha256', SECRET)
  .update(parts.t + '.' + rawBody)
  .digest('hex');
if (Math.abs(Date.now()/1000 - parts.t) > 300) return res.status(400).end();
if (!crypto.timingSafeEqual(
  Buffer.from(expected),
  Buffer.from(parts.v1)
)) return res.status(400).end();
PHP
$sig = $_SERVER['HTTP_X_GIGAGLOBE_SIGNATURE'];
preg_match('/t=(\d+),v1=([a-f0-9]+)/', $sig, $m);
[$t, $v1] = [$m[1], $m[2]];

$body = file_get_contents('php://input');
$expected = hash_hmac('sha256', $t.'.'.$body, $SECRET);

if (abs(time() - (int)$t) > 300) { http_response_code(400); exit; }
if (!hash_equals($expected, $v1)) { http_response_code(400); exit; }

// trusted — handle the event
$event = json_decode($body, true);
Python
import hmac, hashlib, time
sig = request.headers['X-GigaGlobe-Signature']
t, v1 = [p.split('=')[1] for p in sig.split(',')]
expected = hmac.new(
  SECRET.encode(),
  f"{t}.{body}".encode(),
  hashlib.sha256
).hexdigest()
if abs(time.time() - int(t)) > 300: abort(400)
if not hmac.compare_digest(expected, v1): abort(400)
Go
sig := r.Header.Get("X-GigaGlobe-Signature")
// parse t= and v1= ...
mac := hmac.New(sha256.New, []byte(secret))
mac.Write([]byte(t + "." + string(body)))
expected := hex.EncodeToString(mac.Sum(nil))
if math.Abs(float64(time.Now().Unix()-tsInt)) > 300 {
  http.Error(w, "stale", 400); return
}
if !hmac.Equal([]byte(expected), []byte(v1)) {
  http.Error(w, "bad sig", 400); return
}

Politique de relance : immédiate, +30s, +2 min, +10 min, +1h, +6h, +24h. Après 7 tentatives échouées, la livraison est abandonnée. Après 100 échecs consécutifs, le webhook est désactivé automatiquement et vous recevez un courriel.

5. Catalogue de points d'accès

Vingt-cinq endpoints. Nommage à la Stripe.

Identité & domaines

GET /me

GET /domains

POST /domains

POST /domains/search

GET /domains/{id}

GET /domains/{id}/availability

PATCH /domains/{id}

POST /domains/{id}/transfer

POST /domains/{id}/renew

DNS

GET /domains/{id}/dns

POST /domains/{id}/dns

DELETE /domains/{id}/dns/{record}

SSL

GET /ssl

POST /ssl

GET /ssl/{id}

POST /ssl/{id}/renew

POST /ssl/{id}/reissue

Hébergement

GET /hosting

POST /hosting

GET /hosting/{id}

POST /hosting/{id}/suspend

POST /hosting/{id}/unsuspend

POST /hosting/{id}/password

Facturation (lecture seule)

GET /orders

GET /orders/{id}

GET /invoices

GET /invoices/{id}

Webhooks & usage

GET /webhooks

POST /webhooks

PATCH /webhooks/{id}

DELETE /webhooks/{id}

POST /webhooks/{id}/test

GET /usage

Ouvrez la spécification complète à /api/v1/openapi.json — chargez-la dans Stoplight, Swagger UI ou votre générateur de code.

terminal

Collection Postman

25 requêtes, authentification précâblée, tous les exemples de corps. Définissez base_url + api_key et lancez.

download Télécharger .json
api

Spécification OpenAPI 3.0

Générez des SDK dans n'importe quel langage. Hébergée à /api/v1/openapi.json pour que les outils la chargent directement.

open_in_new Voir la spécification
history

Journal des modifications

Chaque modification additive à v1 — nouveaux champs, nouveaux endpoints, nouveaux noms d'événement — avec les dates.

arrow_outward Lire le journal

Générez votre première clé en 30 secondes.

Connectez-vous au tableau de bord Partenaire API, cliquez sur Générer une clé, et exécutez curl /api/v1/me pour vérifier.

login Aller au Partenaire API