Skip to content
Dashboard

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 Markdown

Register 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

  • namestringrequired

    2 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

  • typeenumrequired

    public: in a browser or on a phone, where no secret stays secret. confidential: on a server, which keeps a secret

    One ofpublicconfidential

  • redirectUrisstring[]required

    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, plus this field:

  • clientSecretstring | null

    A 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

  • 403

  • 409

Request
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"]}'
Example data
{
  "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

  • clientIdrequired

    The client's id.

Body

  • namestring

    2 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

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

  • clientIdrequired

    The 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

Request
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

  • clientIdrequired

    The client's id.

Response

Returns an object with these fields:

  • clientSecretstring

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

  • 409

Request
curl -X POST 'https://api.hematite.gg/v1/apps/1/secret' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "clientSecret": "string"
}