Void API — your domains, over REST.

Check availability, register and renew, switch nameservers, put a domain behind Cloudflare and manage its DNS, security switches and redirects — from your own code, on the same account and balance as the bot.

https://api.voidhosting.org/v1 Bearer void_… JSON · UTC · USD strings

Cloudflare

one call to connect, then full control

A connected domain gets a Cloudflare zone from our pool: we create it, switch the nameservers at the registry and proxy your traffic. All endpoints below need a connected domain and answer 409 CLOUDFLARE_NOT_CONNECTED otherwise. Right after connecting the zone is pending until the nameserver change propagates (minutes to an hour); DNS records can be added straight away, cache and settings calls may return CLOUDFLARE_ZONE_PENDING until then.

Zone

GET/domains/{id}/cloudflare

Whether the domain is connected and how far the nameserver switch has propagated.

{ "ok": true, "data": { "connected": true, "domainName": "example.org", "zoneId": "6a18…",
    "nameservers": ["margo.ns.cloudflare.com", "mimi.ns.cloudflare.com"], "zoneStatus": "active", "nsApplied": true } }
// not connected: { "connected": false, "domainName": "…", "zoneId": null, "nameservers": [], "zoneStatus": "none", "nsApplied": false }
POST/domains/{id}/cloudflare201

Creates the zone and switches the registry nameservers to Cloudflare's. Returns the zone status (pending at first). Existing records on our parking nameservers are not carried over — add what you need with POST /dns.

409 CLOUDFLARE_ALREADY503 CLOUDFLARE_NO_ACCOUNTS pool exhausted, retry later
DELETE/domains/{id}/cloudflare

Deletes the zone and returns the domain to our nameservers (parking page). Records, settings and redirects are gone with the zone.

POST/domains/{id}/cloudflare/refresh

Re-reads status and nameservers from Cloudflare and returns the same object as GET. Use it to poll zoneStatus after connecting.

DNS records

GET/domains/{id}/dns

All records in the zone.

{ "ok": true, "data": [ { "id": "fce74ed9…", "type": "A", "name": "api.example.org", "content": "185.225.191.222", "proxied": false, "priority": null }, … ] }
POST/domains/{id}/dns201

Adds a record and returns it with its Cloudflare id.

bodytype
typerequiredA AAAA CNAME TXT MX
namerequiredstringrelative (@ apex, www, _dmarc) or fully qualified
contentrequiredstringIP, hostname or text
proxiedbooleanA / AAAA / CNAME only — traffic through Cloudflare, origin IP hidden
priorityintegerMX only
{ "type": "A",     "name": "@",      "content": "203.0.113.10",       "proxied": true }
{ "type": "CNAME", "name": "www",    "content": "example.org",        "proxied": true }
{ "type": "MX",    "name": "@",      "content": "mail.example.org",   "priority": 10 }
{ "type": "TXT",   "name": "_dmarc", "content": "v=DMARC1; p=none" }
409 DNS_EXISTS identical record already there
PUT/domains/{id}/dns/{recordId}

Replaces a record in full — same body as create. Ids come from GET /dns.

DELETE/domains/{id}/dns/{recordId}

Removes a record. 404 DNS_NOT_FOUND if it is already gone.

Settings & cache

GET/domains/{id}/cloudflare/settings

The zone's security and delivery switches — the same set the bot shows.

{ "ok": true, "data": { "ssl": "full", "developmentMode": false, "underAttack": false, "alwaysOnline": true, "botFightMode": true, "regionBlock": false } }
PATCH/domains/{id}/cloudflare/settings

Change any subset; the response is the full set after the change. An empty body is a 400.

fieldvalueseffect
ssloff flexible full strictCloudflare ↔ origin encryption. flexible when the origin has no certificate; full with a self-signed one; strict with a valid one
developmentModebooleanbypass the cache for 3 hours (auto-off afterwards)
underAttackbooleanJavaScript challenge for every visitor
alwaysOnlinebooleanserve a cached copy while the origin is down
botFightModebooleanchallenge known bots
regionBlockbooleanfirewall rule blocking visitors from CIS countries
{ "ssl": "strict", "underAttack": true, "regionBlock": true }
POST/domains/{id}/cloudflare/purge

Purges the whole cache of the zone. Cheap; safe to call after every deploy.

{ "ok": true, "data": { "purged": true } }

Redirects

GET/domains/{id}/cloudflare/redirects

Redirect rules on the zone.

POST/domains/{id}/cloudflare/redirects201
bodytype
matchrequiredstringpath on the domain (old-page, blog/*) or * for everything
targetrequiredURLwhere to send visitors
permanentboolean · default truetrue → 301, false → 302
{ "match": "*", "target": "https://new-domain.com", "permanent": true }

{ "ok": true, "data": { "id": "3f2a…", "match": "*", "target": "https://new-domain.com", "permanent": true } }
409 REDIRECT_EXISTS same path already redirected409 REDIRECT_LIMIT zone limit reached
DELETE/domains/{id}/cloudflare/redirects/{ruleId}

Removes a rule by the id from the list.

support news voidhosting.org Void · api v1