developers / API reference
Domains API
The Domains API: add a domain, check its nameservers, edit or delete it, with every endpoint's fields, who may call it, its rate limit and a curl example.
This page as MarkdownCreate a new domain
post/domains
It's Public, but one whose name reads as a payment, a sign-in, a brand or hematite's staff (`paypal-support.example`) is Private, and stays so.
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- Not open to apps
- Domains change DNS records at Cloudflare; hematite's website manages them. Nor to API keys.
Body
namestringrequiredAt least 3 characters
Response
Returns a Domain.
Errors of its own
409Domain already exists422Cloudflare rejected the request
curl -X POST 'https://api.hematite.gg/v1/domains' \
-H "Authorization: $HEMATITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Ranked"}'{
"id": 1,
"name": "yourdomain.com",
"userId": 1,
"createdAt": "2026-11-10T18:24:00.000Z",
"updatedAt": "2026-11-10T18:24:00.000Z",
"cloudflareZoneId": "string",
"status": "AwaitingNameservers",
"availability": "Public",
"supportsSubdomain": false,
"supportsPath": false,
"official": false,
"failedAt": null,
"uses": 0
}Get a single domain by ID
get/domains/:domainId
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- Not open to apps
- Domains change DNS records at Cloudflare; hematite's website manages them. Nor to API keys.
Path parameters
domainIdrequiredThe domain's id.
Response
Returns a Domain.
curl 'https://api.hematite.gg/v1/domains/1' \
-H "Authorization: $HEMATITE_TOKEN"{
"id": 1,
"name": "yourdomain.com",
"userId": 1,
"createdAt": "2026-11-10T18:24:00.000Z",
"updatedAt": "2026-11-10T18:24:00.000Z",
"cloudflareZoneId": "string",
"status": "AwaitingNameservers",
"availability": "Public",
"supportsSubdomain": false,
"supportsPath": false,
"official": false,
"failedAt": null,
"uses": 0
}Edit a domain
patch/domains/:domainId
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- Not open to apps
- Domains change DNS records at Cloudflare; hematite's website manages them. Nor to API keys.
Path parameters
domainIdrequiredThe domain's id.
Body
Send at least one field.
availabilityenumOne of
PublicPremiumPrivatesupportsSubdomainbooleansupportsPathboolean
Response
Returns a Domain.
curl -X PATCH 'https://api.hematite.gg/v1/domains/1' \
-H "Authorization: $HEMATITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"availability":"Public"}'{
"id": 1,
"name": "yourdomain.com",
"userId": 1,
"createdAt": "2026-11-10T18:24:00.000Z",
"updatedAt": "2026-11-10T18:24:00.000Z",
"cloudflareZoneId": "string",
"status": "AwaitingNameservers",
"availability": "Public",
"supportsSubdomain": false,
"supportsPath": false,
"official": false,
"failedAt": null,
"uses": 0
}Delete a domain
delete/domains/:domainId
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- Not open to apps
- Domains change DNS records at Cloudflare; hematite's website manages them. Nor to API keys.
Path parameters
domainIdrequiredThe domain's id.
Response
data is empty: the status says it worked.
curl -X DELETE 'https://api.hematite.gg/v1/domains/1' \
-H "Authorization: $HEMATITE_TOKEN"Ask Cloudflare to look at your domain's nameservers again now, after you changed them at your registrar, instead of waiting for its own next look
post/domains/:domainId/activation-check
Only while the domain waits for its nameservers. Cloudflare takes this once an hour for a zone on its free plan; hematite's own check, every minute, then sets the domain up as soon as Cloudflare has seen them.
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 5 a minute
- Per address, for this endpoint.
- App scope
- Not open to apps
- Domains change DNS records at Cloudflare; hematite's website manages them. Nor to API keys.
Path parameters
domainIdrequiredThe domain's id.
Response
data is empty: the status says it worked.
Errors of its own
403Only its owner can ask404There's no domain with this id409422Cloudflare didn't take the requestWith this in its data:
errorsobject[]What Cloudflare said, in its words: most often that it was asked too recently.
codenumberoptionalmessagestring
curl -X POST 'https://api.hematite.gg/v1/domains/1/activation-check' \
-H "Authorization: $HEMATITE_TOKEN"Get the DNS records of your domain's Cloudflare zone, and what setting it up does to each: hematite replaces only an A, AAAA or CNAME on the domain itself and on its wildcard with its own two records, and every other record stays
get/domains/:domainId/dns
These are what the domain answers with once its nameservers point at Cloudflare. Only its owner can ask.
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- Not open to apps
- Domains change DNS records at Cloudflare; hematite's website manages them. Nor to API keys.
Path parameters
domainIdrequiredThe domain's id.
Response
Returns an object with these fields:
recordsobject[]The zone's records now: the apex first, then by name and type.
typestringThe record's type: A, AAAA, CNAME, MX, TXT and so on.
namestringIts complete name, the domain itself for the apex.
contentstringWhat it answers with.
proxiedbooleanWhether Cloudflare answers for it and passes requests on.
prioritynumber | nullAn MX record's priority, or null.
changeenumkeep: it stays. replace: setting the domain up removes it for hematite's own. hematite: one of hematite's two.
One of
keepreplacehematite
addobject[]hematite's records still to be added: both until the domain is set up, none after.
typestringThe record's type: A, AAAA, CNAME, MX, TXT and so on.
namestringIts complete name, the domain itself for the apex.
contentstringWhat it answers with.
proxiedbooleanWhether Cloudflare answers for it and passes requests on.
Errors of its own
403Only its owner can ask404There's no domain with this id409Domain does not have a Cloudflare zone ID422Couldn't read the zone's records from Cloudflare
curl 'https://api.hematite.gg/v1/domains/1/dns' \
-H "Authorization: $HEMATITE_TOKEN"{
"records": [
{
"type": "string",
"name": "Ranked",
"content": "That last round",
"proxied": false,
"priority": 0,
"change": "keep"
}
],
"add": [
{
"type": "string",
"name": "Ranked",
"content": "That last round",
"proxied": false
}
]
}Get the nameservers your domain should have, Cloudflare's two for its zone (`add`), and the ones Cloudflare found at your registrar when the zone was made (`remove`, null when it found none)
get/domains/:domainId/nameservers
Only its owner can ask. While the domain waits for its nameservers they're what to change; later, what to check when it stops answering.
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- Not open to apps
- Domains change DNS records at Cloudflare; hematite's website manages them. Nor to API keys.
Path parameters
domainIdrequiredThe domain's id.
Response
Returns an object with these fields:
addstring[]removestring[] | null
curl 'https://api.hematite.gg/v1/domains/1/nameservers' \
-H "Authorization: $HEMATITE_TOKEN"{
"add": [
"string"
],
"remove": [
"string"
]
}Get a domain's stats
get/domains/:domainId/stats
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- Not open to apps
- Domains change DNS records at Cloudflare; hematite's website manages them. Nor to API keys.
Path parameters
domainIdrequiredThe domain's id.
Response
Returns an any.
curl 'https://api.hematite.gg/v1/domains/1/stats' \
-H "Authorization: $HEMATITE_TOKEN"nullGet users that use this domain
get/domains/:domainId/users
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- Not open to apps
- Domains change DNS records at Cloudflare; hematite's website manages them. Nor to API keys.
Path parameters
domainIdrequiredThe domain's id.
Response
Returns a list, each item an object with these fields:
idintegerusernamestringavatarobject | nulloptionalThe user's avatar, or null without one. Left out of a user who hides their page, unless it's you: anyone else gets only their id and username.
keystring
domainIdintegerThis domain's id: the domain the user's share links use.
curl 'https://api.hematite.gg/v1/domains/1/users' \
-H "Authorization: $HEMATITE_TOKEN"[
{
"id": 1,
"username": "nova",
"avatar": {
"key": "images/a1b2c3d4e5f6.png"
},
"domainId": 1
}
]Get all discoverable domains
get/domains/discovery
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- Not open to apps
- Domains change DNS records at Cloudflare; hematite's website manages them. Nor to API keys.
Response
Returns a list of Domains.
curl 'https://api.hematite.gg/v1/domains/discovery' \
-H "Authorization: $HEMATITE_TOKEN"[
{
"id": 1,
"name": "yourdomain.com",
"userId": 1,
"createdAt": "2026-11-10T18:24:00.000Z",
"updatedAt": "2026-11-10T18:24:00.000Z",
"cloudflareZoneId": "string",
"status": "AwaitingNameservers",
"availability": "Public",
"supportsSubdomain": false,
"supportsPath": false,
"official": false,
"failedAt": null,
"uses": 0
}
]