Skip to content
Dashboard

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 Markdown

Create 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

  • namestringrequired

    At least 3 characters

Response

Returns a Domain.

Errors of its own

  • 409Domain already exists

  • 422Cloudflare rejected the request

Request
curl -X POST 'https://api.hematite.gg/v1/domains' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Ranked"}'
Example data
{
  "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

  • domainIdrequired

    The domain's id.

Response

Returns a Domain.

Request
curl 'https://api.hematite.gg/v1/domains/1' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "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

  • domainIdrequired

    The domain's id.

Body

Send at least one field.

  • availabilityenum

    One ofPublicPremiumPrivate

  • supportsSubdomainboolean
  • supportsPathboolean

Response

Returns a Domain.

Request
curl -X PATCH 'https://api.hematite.gg/v1/domains/1' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"availability":"Public"}'
Example data
{
  "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

  • domainIdrequired

    The domain's id.

Response

data is empty: the status says it worked.

Request
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

  • domainIdrequired

    The domain's id.

Response

data is empty: the status says it worked.

Errors of its own

  • 403Only its owner can ask

  • 404There's no domain with this id

  • 409

  • 422Cloudflare didn't take the request

    With this in its data:

    • errorsobject[]

      What Cloudflare said, in its words: most often that it was asked too recently.

Request
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

  • domainIdrequired

    The domain's id.

Response

Returns an object with these fields:

  • recordsobject[]

    The zone's records now: the apex first, then by name and type.

  • addobject[]

    hematite's records still to be added: both until the domain is set up, none after.

Errors of its own

  • 403Only its owner can ask

  • 404There's no domain with this id

  • 409Domain does not have a Cloudflare zone ID

  • 422Couldn't read the zone's records from Cloudflare

Request
curl 'https://api.hematite.gg/v1/domains/1/dns' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "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

  • domainIdrequired

    The domain's id.

Response

Returns an object with these fields:

  • addstring[]
  • removestring[] | null
Request
curl 'https://api.hematite.gg/v1/domains/1/nameservers' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "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

  • domainIdrequired

    The domain's id.

Response

Returns an any.

Request
curl 'https://api.hematite.gg/v1/domains/1/stats' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
null

Get 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

  • domainIdrequired

    The domain's id.

Response

Returns a list, each item an object with these fields:

  • idinteger
  • usernamestring
  • avatarobject | nulloptional

    The 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.

  • domainIdinteger

    This domain's id: the domain the user's share links use.

Request
curl 'https://api.hematite.gg/v1/domains/1/users' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  {
    "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.

Request
curl 'https://api.hematite.gg/v1/domains/discovery' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  {
    "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
  }
]