developers / API reference
Apps API
The Apps API: register apps for Sign in with hematite, edit and delete them, with every endpoint's fields, who may call it, its rate limit and a curl example.
This page as MarkdownRegister an app that signs people in with hematite (D-34)
post/apps
It needs a confirmed email address. Each account can register up to 5 apps. A public app (in a browser or on a phone) proves itself with PKCE alone; a confidential one (on a server) also with its secret, which this response is the only time to see: hematite keeps just its hash.
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 10 a minute
- Per address, for this endpoint.
- App scope
- Not open to apps
- Apps are registered and managed by their makers, signed in to hematite. Nor to API keys.
Body
namestringrequired2 to 40 characters. Never "hematite" or anything that reads as it (case, spacing, accents and look-alike letters don't count), nor a name kept for hematite such as Support or Admin
typeenumrequiredpublic: in a browser or on a phone, where no secret stays secret. confidential: on a server, which keeps a secret
One of
publicconfidentialredirectUrisstring[]required1 to 10 exact addresses, each https:// (http:// only for localhost and 127.0.0.1, with the port you use), without a #fragment
1 to 10 items
Response
Returns an App, plus this field:
clientSecretstring | nullA confidential app's secret (hma_…), shown only now: hematite keeps just a keyed hash of it. Null for a public app
Errors of its own
403409
curl -X POST 'https://api.hematite.gg/v1/apps' \
-H "Authorization: $HEMATITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Ranked","type":"public","redirectUris":["string"]}'{
"clientId": "string",
"name": "Ranked",
"type": "public",
"redirectUris": [
"string"
],
"userCount": 0,
"createdAt": "2026-11-10T18:24:00.000Z",
"updatedAt": "2026-11-10T18:24:00.000Z",
"clientSecret": "string"
}Rename one of your apps or change the addresses it may send people back to
patch/apps/:clientId
The new name shows on the consent page and in people's connected apps at once, and an address taken out can't be asked for again. Its type can't change: register another app for that.
- 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
- Apps are registered and managed by their makers, signed in to hematite. Nor to API keys.
Path parameters
clientIdrequiredThe client's id.
Body
namestring2 to 40 characters. Never "hematite" or anything that reads as it (case, spacing, accents and look-alike letters don't count), nor a name kept for hematite such as Support or Admin
redirectUrisstring[]1 to 10 exact addresses, each https:// (http:// only for localhost and 127.0.0.1, with the port you use), without a #fragment
1 to 10 items
Response
Returns an App.
Errors of its own
404There's no app of yours with this client id
curl -X PATCH 'https://api.hematite.gg/v1/apps/1' \
-H "Authorization: $HEMATITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Ranked"}'{
"clientId": "string",
"name": "Ranked",
"type": "public",
"redirectUris": [
"string"
],
"userCount": 0,
"createdAt": "2026-11-10T18:24:00.000Z",
"updatedAt": "2026-11-10T18:24:00.000Z"
}Delete one of your apps
delete/apps/:clientId
Everyone who connected it is disconnected at once: every token it holds stops working, its codes not yet traded too, and its client id is known no more.
- 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
- Apps are registered and managed by their makers, signed in to hematite. Nor to API keys.
Path parameters
clientIdrequiredThe client's id.
Response
data is empty: the status says it worked.
Errors of its own
404There's no app of yours with this client id
curl -X DELETE 'https://api.hematite.gg/v1/apps/1' \
-H "Authorization: $HEMATITE_TOKEN"Replace a confidential app's secret
post/apps/:clientId/secret
The old one stops working at once, and this response is the only time to see the new one: hematite keeps just its hash. Nobody is signed out: the app's next token request needs the new secret. A public app has no secret.
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 10 a minute
- Per address, for this endpoint.
- App scope
- Not open to apps
- Apps are registered and managed by their makers, signed in to hematite. Nor to API keys.
Path parameters
clientIdrequiredThe client's id.
Response
Returns an object with these fields:
clientSecretstringThe new secret (hma_…), shown only now: hematite keeps just a keyed hash of it
Errors of its own
404There's no app of yours with this client id409
curl -X POST 'https://api.hematite.gg/v1/apps/1/secret' \
-H "Authorization: $HEMATITE_TOKEN"{
"clientSecret": "string"
}