Skip to content
Dashboard

developers / API reference

Users API

The Users API: profiles, upload settings, storage, and a user's images, with every endpoint's fields, who may call it, its rate limit and a curl example.

This page as Markdown

Get a single user by ID

get/users/:userId

Needs
No token needed
Anyone may call it.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a User or a HiddenUser.

Request
curl 'https://api.hematite.gg/v1/users/1'
Example data
{
  "id": 1,
  "username": "nova",
  "email": "nova@example.com",
  "emailConfirmedAt": "2026-11-10T18:24:00.000Z",
  "createdAt": "2026-11-10T18:24:00.000Z",
  "updatedAt": "2026-11-10T18:24:00.000Z",
  "permissionGroupId": 1,
  "subscriptionGroupId": 1,
  "stripeSubscriptionId": "string",
  "domainId": 1,
  "avatarId": 1,
  "stripeCustomerId": "string",
  "inviteId": 1,
  "timeZone": "string",
  "avatar": {
    "key": "images/a1b2c3d4e5f6.png"
  },
  "badgeIds": [
    1
  ],
  "storageUsed": 2457600,
  "storageLimit": 1073741824,
  "imageCount": 1,
  "folderCount": 0,
  "publicImageCount": 0,
  "publicFolderCount": 0,
  "profile": {
    "bio": "Screenshots from ranked nights",
    "hideProfile": false,
    "activityVisibility": "All"
  }
}

Update a user by ID

patch/users/:userId

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:write
What an app's token or an API key needs.
Apps can't send: email, profile.hideProfile, profile.activityVisibility, timeZone

Path parameters

  • userIdrequired

    The user's id.

Body

Send at least one field.

  • usernamestring

    A new username: one nobody has yet, nor gave up in the last 30 days (unless it was you), and not one hematite keeps (POST /users/check-username says which).

    3 to 64 characters, matches ^[a-zA-Z0-9_]+$

  • emailstringApps can't send it

    A new email address: one no account uses yet, nor a closed account's.

  • timeZonestringApps can't send it

    Your time zone by its IANA name (Europe/Berlin), as your browser reports it: the calendar your achievements count days by. Apps can't change it.

  • profileobject

    What others see of you and who may see it. Send only what changes; the rest stays.

  • domainIdnumber

    The id of the domain your share links use. It has to exist.

Response

Returns a User.

Request
curl -X PATCH 'https://api.hematite.gg/v1/users/1' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"username":"nova"}'
Example data
{
  "id": 1,
  "username": "nova",
  "email": "nova@example.com",
  "emailConfirmedAt": "2026-11-10T18:24:00.000Z",
  "createdAt": "2026-11-10T18:24:00.000Z",
  "updatedAt": "2026-11-10T18:24:00.000Z",
  "permissionGroupId": 1,
  "subscriptionGroupId": 1,
  "stripeSubscriptionId": "string",
  "domainId": 1,
  "avatarId": 1,
  "stripeCustomerId": "string",
  "inviteId": 1,
  "timeZone": "string",
  "avatar": {
    "key": "images/a1b2c3d4e5f6.png"
  },
  "badgeIds": [
    1
  ],
  "storageUsed": 2457600,
  "storageLimit": 1073741824,
  "imageCount": 1,
  "folderCount": 0,
  "publicImageCount": 0,
  "publicFolderCount": 0,
  "profile": {
    "bio": "Screenshots from ranked nights",
    "hideProfile": false,
    "activityVisibility": "All"
  }
}

Get a user's achievement assignments: yours with the counts and times, anyone else's with only the tier each reached, and none of a hidden profile's

get/users/:userId/achievement-assignments

Needs
No token needed
Anyone may call it.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a list of AchievementAssignments.

Request
curl 'https://api.hematite.gg/v1/users/1/achievement-assignments'
Example data
[
  {
    "id": 1,
    "userId": 1,
    "achievementId": 1,
    "currentValue": 0,
    "bestValue": 0,
    "currentTier": 0,
    "createdAt": "2026-11-10T18:24:00.000Z",
    "updatedAt": "2026-11-10T18:24:00.000Z",
    "unlockedAt": null
  }
]

Get the tiers you reached, newest first (the latest 50): which achievement, which tier and when

get/users/:userId/achievement-unlocks

Tiers counted from what you did before the achievements' counting started say so (`backfilled`). Only your own.

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a list of AchievementUnlocks.

Request
curl 'https://api.hematite.gg/v1/users/1/achievement-unlocks' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  {
    "id": 1,
    "achievementId": 1,
    "tier": 1,
    "reachedAt": "2026-11-10T18:24:00.000Z",
    "backfilled": false
  }
]

Get a user's upload activity

get/users/:userId/activity

How many images they uploaded on each day that had any (UTC, `YYYY-MM-DD`): counts only, never the images. The user gets all of theirs, private and deleted uploads included. Anyone else gets what the user's `profile.activityVisibility` allows: with `All` every image they have, private and unlisted ones too; with `Public` only the public ones that show who uploaded them; with `Private`, or when the user hides their page, nothing (`{}`).

Needs
No token needed
Anyone may call it.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a map of number.

Request
curl 'https://api.hematite.gg/v1/users/1/activity'
Example data
{
  "dataKey": 0
}

The apps you registered (D-34), newest first, each with how many people have it connected now

get/users/:userId/apps

Only your own: the apps you allowed are your connected apps (`/users/:userId/connected-apps`).

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

  • userIdrequired

    The user's id.

Response

Returns a list of Apps.

Request
curl 'https://api.hematite.gg/v1/users/1/apps' \
  -H "Authorization: $HEMATITE_TOKEN"
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"
  }
]

Update a user's avatar

put/users/:userId/avatar

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:write
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Form data

Sent as multipart/form-data: the file as file, PNG, JPEG, WEBP, at most 2 MB; the fields below beside it.

Response

Returns a string.

Request
curl -X PUT 'https://api.hematite.gg/v1/users/1/avatar' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -F "file=@screenshot.png"
Example data
"string"

Delete a user's avatar

delete/users/:userId/avatar

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:write
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

data is empty: the status says it worked.

Request
curl -X DELETE 'https://api.hematite.gg/v1/users/1/avatar' \
  -H "Authorization: $HEMATITE_TOKEN"

Get a user's comments

get/users/:userId/comments

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
comments:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a list of Comments.

Request
curl 'https://api.hematite.gg/v1/users/1/comments' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  {
    "id": 1,
    "userId": 1,
    "createdAt": "2026-11-10T18:24:00.000Z",
    "updatedAt": "2026-11-10T18:24:00.000Z",
    "referenceType": "Image",
    "referenceId": 1,
    "content": "That last round",
    "parentId": null,
    "offlineAt": "2026-11-10T18:24:00.000Z",
    "likeCount": 0
  }
]

Get a user's domains

get/users/:userId/domains

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

  • userIdrequired

    The user's id.

Response

Returns a list of Domains.

Request
curl 'https://api.hematite.gg/v1/users/1/domains' \
  -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
  }
]

Get the link preview styles you can choose (Settings → Embeds): the six built-ins every plan has (hematite, Minimal, Detailed, Gamer, Photo mode, Quiet), in that order, then your account's own, then your saved styles by name

get/users/:userId/embed-styles

Which one your links follow is your upload settings' `embedStyleId`.

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
60 a minute
Per address, for this endpoint.
App scope
users:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a list of EmbedStyles.

Request
curl 'https://api.hematite.gg/v1/users/1/embed-styles' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  {
    "id": 1,
    "key": "hematite",
    "name": "Ranked",
    "about": "string",
    "basedOn": "hematite",
    "version": 0,
    "author": "Uploader",
    "picture": "Large",
    "cropToCard": false,
    "colour": "Hematite",
    "colourHex": "string",
    "showTime": false,
    "motion": false,
    "title": "Clutch on Ascent",
    "description": "1v4 on the last round",
    "site": "Hematite",
    "siteText": "string"
  }
]

Save a link preview style by its name (Silver 10, Gold 25): the built-in it starts from, every choice and its own words

post/users/:userId/embed-styles

With `use`, it's what your links follow from now on.

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
30 a minute
Per address, for this endpoint.
App scope
Not open to apps
A link preview's style is written in Settings → Embeds, which previews it. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

Body

  • basedOnenumrequired

    The built-in it starts from, whose words the card says where it has none of its own

    One ofhematiteminimaldetailedgamerphoto-modequiet

  • authorenumrequired

    Who the card names over its title, in Discord through oEmbed: Uploader (the uploader, or a folder's owner) or None. Hiding yourself as an image's uploader, or hiding your page, names nobody whatever the style says

    One ofUploaderNone

  • pictureenumrequired

    How the card shows its picture: Large under the words, Small beside them (square), Alone (Discord shows only the picture; elsewhere the large card), None. An image marked NSFW or shielded shows none whatever the style says

    One ofLargeSmallAloneNone

  • cropToCardbooleanrequired

    With a large picture: cropped to 1.91 : 1, the shape X, Facebook, LinkedIn and WhatsApp draw, round its busiest part

  • colourenumrequired

    The colour of Discord's bar, the only platform that shows one: Hematite (the accent's ice steel), Picture (the picture's own, made light enough to read on Discord's grey) or Custom (colourHex)

    One ofHematitePictureCustom

  • colourHexstring | nullrequired

    Your own colour: # and six hex digits. Needed with Custom; kept otherwise, so choosing Custom again finds it

  • showTimebooleanrequired

    When it was uploaded, under the card in each reader's own time (Discord)

  • motionbooleanrequired

    An animated GIF or WebP moves in the card; off, it's its first frame

  • titlestring | null

    Its own title, a template (concept 11 §3: {title|"A screenshot"}), at most 300 characters and one line; null or left out says the built-in's. From Silver

  • descriptionstring | null

    Its own description, a template, at most 600 characters, from Silver; "" leaves it out of the card (every plan); null or left out says the built-in's

  • siteenum

    The site line over the title: Hematite, Domain (the domain your links go to, while it works) or Custom (siteText). Anything but Hematite from Silver

    One ofHematiteDomainCustom

  • siteTextstring | null

    Its own site name with site Custom, a template, at most 32 characters and one line, saying no service, brand or authority. Kept while another site line is chosen

  • namestringrequired

    Its name, at most 32 characters, unique among your styles

  • useboolean

    Make it the style your links follow

    Defaultfalse

Response

Returns an EmbedStyle.

Errors of its own

  • 403

  • 404No such style of yours

  • 409

  • 422

Request
curl -X POST 'https://api.hematite.gg/v1/users/1/embed-styles' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"basedOn":"hematite","author":"Uploader","picture":"Large","cropToCard":false,"colour":"Hematite","colourHex":"string","showTime":false,"motion":false,"name":"Ranked"}'
Example data
{
  "id": 1,
  "key": "hematite",
  "name": "Ranked",
  "about": "string",
  "basedOn": "hematite",
  "version": 0,
  "author": "Uploader",
  "picture": "Large",
  "cropToCard": false,
  "colour": "Hematite",
  "colourHex": "string",
  "showTime": false,
  "motion": false,
  "title": "Clutch on Ascent",
  "description": "1v4 on the last round",
  "site": "Hematite",
  "siteText": "string"
}

Change one of your saved link preview styles in place, its name too: every link that follows it says the new card

patch/users/:userId/embed-styles/:styleId

Your own words and site line need a plan that gives them; a plan without keeps them as they are.

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
30 a minute
Per address, for this endpoint.
App scope
Not open to apps
A link preview's style is written in Settings → Embeds, which previews it. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

  • styleIdnumberrequired

Body

  • basedOnenumrequired

    The built-in it starts from, whose words the card says where it has none of its own

    One ofhematiteminimaldetailedgamerphoto-modequiet

  • authorenumrequired

    Who the card names over its title, in Discord through oEmbed: Uploader (the uploader, or a folder's owner) or None. Hiding yourself as an image's uploader, or hiding your page, names nobody whatever the style says

    One ofUploaderNone

  • pictureenumrequired

    How the card shows its picture: Large under the words, Small beside them (square), Alone (Discord shows only the picture; elsewhere the large card), None. An image marked NSFW or shielded shows none whatever the style says

    One ofLargeSmallAloneNone

  • cropToCardbooleanrequired

    With a large picture: cropped to 1.91 : 1, the shape X, Facebook, LinkedIn and WhatsApp draw, round its busiest part

  • colourenumrequired

    The colour of Discord's bar, the only platform that shows one: Hematite (the accent's ice steel), Picture (the picture's own, made light enough to read on Discord's grey) or Custom (colourHex)

    One ofHematitePictureCustom

  • colourHexstring | nullrequired

    Your own colour: # and six hex digits. Needed with Custom; kept otherwise, so choosing Custom again finds it

  • showTimebooleanrequired

    When it was uploaded, under the card in each reader's own time (Discord)

  • motionbooleanrequired

    An animated GIF or WebP moves in the card; off, it's its first frame

  • titlestring | null

    Its own title, a template (concept 11 §3: {title|"A screenshot"}), at most 300 characters and one line; null or left out says the built-in's. From Silver

  • descriptionstring | null

    Its own description, a template, at most 600 characters, from Silver; "" leaves it out of the card (every plan); null or left out says the built-in's

  • siteenum

    The site line over the title: Hematite, Domain (the domain your links go to, while it works) or Custom (siteText). Anything but Hematite from Silver

    One ofHematiteDomainCustom

  • siteTextstring | null

    Its own site name with site Custom, a template, at most 32 characters and one line, saying no service, brand or authority. Kept while another site line is chosen

  • namestringrequired

    Its name, at most 32 characters, unique among your styles

Response

Returns an EmbedStyle.

Errors of its own

  • 403

  • 404No such style of yours

  • 409

  • 422

Request
curl -X PATCH 'https://api.hematite.gg/v1/users/1/embed-styles/1' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"basedOn":"hematite","author":"Uploader","picture":"Large","cropToCard":false,"colour":"Hematite","colourHex":"string","showTime":false,"motion":false,"name":"Ranked"}'
Example data
{
  "id": 1,
  "key": "hematite",
  "name": "Ranked",
  "about": "string",
  "basedOn": "hematite",
  "version": 0,
  "author": "Uploader",
  "picture": "Large",
  "cropToCard": false,
  "colour": "Hematite",
  "colourHex": "string",
  "showTime": false,
  "motion": false,
  "title": "Clutch on Ascent",
  "description": "1v4 on the last round",
  "site": "Hematite",
  "siteText": "string"
}

Delete one of your saved link preview styles, on any plan

delete/users/:userId/embed-styles/:styleId

If your links follow it, they go back to hematite's default.

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
30 a minute
Per address, for this endpoint.
App scope
Not open to apps
A link preview's style is written in Settings → Embeds, which previews it. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

  • styleIdnumberrequired

Response

Returns an object with these fields:

  • deletedtrue

    Must be true

Request
curl -X DELETE 'https://api.hematite.gg/v1/users/1/embed-styles/1' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "deleted": true
}

Get a user's folders

get/users/:userId/folders

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
folders:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a list of Folders.

Request
curl 'https://api.hematite.gg/v1/users/1/folders' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  {
    "id": 1,
    "userId": 1,
    "createdAt": "2026-11-10T18:24:00.000Z",
    "updatedAt": "2026-11-10T18:24:00.000Z",
    "contentType": "Image",
    "name": "Ranked",
    "description": "1v4 on the last round",
    "visibility": "Unlisted",
    "color": "#c4d4e0",
    "previewId": 1,
    "downloads": 0,
    "privateLockedAt": "2026-11-10T18:24:00.000Z",
    "offlineAt": "2026-11-10T18:24:00.000Z",
    "preview": {
      "key": "images/a1b2c3d4e5f6.png"
    },
    "shareId": 1,
    "shareCode": "x7Kp2QmA",
    "contentCount": 1,
    "size": 2457600,
    "contentCountForOthers": 0,
    "sizeForOthers": 0,
    "viewCount": 0,
    "likeCount": 0,
    "commentCount": 0
  }
]

Get all images for a user

get/users/:userId/images

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
images:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Query

  • limitnumber

    Default100

    At least 1

  • offsetnumber

    Default0

    At least 0

  • partialboolean

    Defaultfalse

  • searchstring

Response

Returns a list, each an Image or a PartialImage.

Request
curl 'https://api.hematite.gg/v1/users/1/images' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  {
    "id": 1,
    "userId": 1,
    "createdAt": "2026-11-10T18:24:00.000Z",
    "updatedAt": "2026-11-10T18:24:00.000Z",
    "title": "Clutch on Ascent",
    "description": "1v4 on the last round",
    "visibility": "Unlisted",
    "folderId": 1,
    "views": 0,
    "downloads": 0,
    "favorite": false,
    "application": "VALORANT",
    "filename": "a1b2c3d4e5f6.png",
    "size": 2457600,
    "width": 1920,
    "height": 1080,
    "nsfw": false,
    "storageId": 1,
    "autoDeleteAt": null,
    "hideUser": false,
    "shield": false,
    "nsfwLockedAt": "2026-11-10T18:24:00.000Z",
    "privateLockedAt": "2026-11-10T18:24:00.000Z",
    "offlineAt": "2026-11-10T18:24:00.000Z",
    "storage": {
      "key": "images/a1b2c3d4e5f6.png"
    },
    "shareId": 1,
    "shareCode": "x7Kp2QmA",
    "likeCount": 0,
    "commentCount": 0,
    "meta": {
      "id": 1,
      "blurHash": "string",
      "dominantColor": "string",
      "palette": null,
      "hasAlpha": false,
      "animated": false,
      "orientation": 0
    },
    "treatment": "string",
    "burn": {
      "secondsPerView": 0,
      "viewsEach": 0,
      "viewsInAll": 0,
      "then": "Blur",
      "viewsUsed": 0,
      "burnedAt": "string"
    }
  }
]

Get a user's discovery images: their public uploads, as their page shows them

get/users/:userId/images/discovery

Anyone but the user gets none of a hidden page, and never an image that hides who uploaded it. With `withoutShowcase`, the shots the showcase draws are left out, as the page lists the uploads under it.

Needs
No token needed
Anyone may call it.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
images:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Query

  • withoutShowcaseboolean

    Leave out the shots the user's showcase draws for you (GET /users/:userId/showcase), as their page lists its uploads under it: for you, every pin of yours that shows; for anyone else's, their pins once at least three show.

    Defaultfalse

Response

Returns a list of Images.

Request
curl 'https://api.hematite.gg/v1/users/1/images/discovery'
Example data
[
  {
    "id": 1,
    "userId": 1,
    "createdAt": "2026-11-10T18:24:00.000Z",
    "updatedAt": "2026-11-10T18:24:00.000Z",
    "title": "Clutch on Ascent",
    "description": "1v4 on the last round",
    "visibility": "Unlisted",
    "folderId": 1,
    "views": 0,
    "downloads": 0,
    "favorite": false,
    "application": "VALORANT",
    "filename": "a1b2c3d4e5f6.png",
    "size": 2457600,
    "width": 1920,
    "height": 1080,
    "nsfw": false,
    "storageId": 1,
    "autoDeleteAt": null,
    "hideUser": false,
    "shield": false,
    "nsfwLockedAt": "2026-11-10T18:24:00.000Z",
    "privateLockedAt": "2026-11-10T18:24:00.000Z",
    "offlineAt": "2026-11-10T18:24:00.000Z",
    "storage": {
      "key": "images/a1b2c3d4e5f6.png"
    },
    "shareId": 1,
    "shareCode": "x7Kp2QmA",
    "likeCount": 0,
    "commentCount": 0,
    "meta": {
      "id": 1,
      "blurHash": "string",
      "dominantColor": "string",
      "palette": null,
      "hasAlpha": false,
      "animated": false,
      "orientation": 0
    },
    "treatment": "string",
    "burn": {
      "secondsPerView": 0,
      "viewsEach": 0,
      "viewsInAll": 0,
      "then": "Blur",
      "viewsUsed": 0,
      "burnedAt": "string"
    }
  }
]

Get a user's image-ids that exceed the storage limit

get/users/:userId/images/over-quota

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
images:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a list, each item a number.

Request
curl 'https://api.hematite.gg/v1/users/1/images/over-quota' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  0
]

Search for a user's images

post/users/:userId/images/search

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
images:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Body

  • limitinteger

    Default100

    More than 0

  • offsetinteger

    Default0

    At least 0

  • queryobject
  • orderobject
  • filterobject[]
  • partialboolean

    Defaultfalse

Response

Returns an object with these fields:

Request
curl -X POST 'https://api.hematite.gg/v1/users/1/images/search' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"limit":100}'
Example data
{
  "results": [
    {
      "id": 1,
      "userId": 1,
      "createdAt": "2026-11-10T18:24:00.000Z",
      "updatedAt": "2026-11-10T18:24:00.000Z",
      "title": "Clutch on Ascent",
      "description": "1v4 on the last round",
      "visibility": "Unlisted",
      "folderId": 1,
      "views": 0,
      "downloads": 0,
      "favorite": false,
      "application": "VALORANT",
      "filename": "a1b2c3d4e5f6.png",
      "size": 2457600,
      "width": 1920,
      "height": 1080,
      "nsfw": false,
      "storageId": 1,
      "autoDeleteAt": null,
      "hideUser": false,
      "shield": false,
      "nsfwLockedAt": "2026-11-10T18:24:00.000Z",
      "privateLockedAt": "2026-11-10T18:24:00.000Z",
      "offlineAt": "2026-11-10T18:24:00.000Z",
      "storage": {
        "key": "images/a1b2c3d4e5f6.png"
      },
      "shareId": 1,
      "shareCode": "x7Kp2QmA",
      "likeCount": 0,
      "commentCount": 0,
      "meta": {
        "id": 1,
        "blurHash": "string",
        "dominantColor": "string",
        "palette": null,
        "hasAlpha": false,
        "animated": false,
        "orientation": 0
      },
      "treatment": "string",
      "burn": {
        "secondsPerView": 0,
        "viewsEach": 0,
        "viewsInAll": 0,
        "then": "Blur",
        "viewsUsed": 0,
        "burnedAt": "string"
      }
    }
  ],
  "total": 0
}

Your personal API keys that work, newest first, each with the child keys cut from it

get/users/:userId/keys

Never a token: a key's is shown once, when it's made. Only your own, signed in to hematite.

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
API keys are made, listed and turned off by their user, signed in to hematite. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a list of ApiKeys, each plus this field:

  • childrenApiKey[]

    The child keys cut from it that still work, newest first

Request
curl 'https://api.hematite.gg/v1/users/1/keys' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  {
    "publicId": "m0plGGtn67kMZy6D",
    "note": "ShareX",
    "scopes": [
      "images:read"
    ],
    "constraints": {
      "ips": [
        "203.0.113.7"
      ],
      "perMinute": 0,
      "folderId": 1,
      "visibility": "Unlisted"
    },
    "usesLeft": 0,
    "parent": "string",
    "createdAt": "2026-11-10T18:24:00.000Z",
    "usedAt": "2026-11-10T18:24:00.000Z",
    "expiresAt": "2026-11-10T18:24:00.000Z",
    "children": [
      {
        "publicId": "m0plGGtn67kMZy6D",
        "note": "ShareX",
        "scopes": [
          "images:read"
        ],
        "constraints": {
          "ips": [
            "203.0.113.7"
          ],
          "perMinute": 0,
          "folderId": 1,
          "visibility": "Unlisted"
        },
        "usesLeft": 0,
        "parent": "string",
        "createdAt": "2026-11-10T18:24:00.000Z",
        "usedAt": "2026-11-10T18:24:00.000Z",
        "expiresAt": "2026-11-10T18:24:00.000Z"
      }
    ]
  }
]

Get a user's likes

get/users/:userId/likes

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
likes:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a list of Likes.

Request
curl 'https://api.hematite.gg/v1/users/1/likes' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  {
    "id": 1,
    "userId": 1,
    "createdAt": "2026-11-10T18:24:00.000Z",
    "referenceType": "Image",
    "referenceId": 1
  }
]

Get a user's notifications

get/users/:userId/notifications

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
notifications:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a list of Notifications.

Request
curl 'https://api.hematite.gg/v1/users/1/notifications' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  {
    "id": 1,
    "userId": 1,
    "createdAt": "2026-11-10T18:24:00.000Z",
    "updatedAt": "2026-11-10T18:24:00.000Z",
    "type": "Neutral",
    "title": "Clutch on Ascent",
    "message": "OK",
    "status": "Unread",
    "metadata": null
  }
]

Mark all your notifications read, in one request

post/users/:userId/notifications/read

Returns the ones it read, as they now are; one that arrives meanwhile stays new. Only your own.

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
30 a minute
Per address, for this endpoint.
App scope
notifications:write
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a list of Notifications.

Request
curl -X POST 'https://api.hematite.gg/v1/users/1/notifications/read' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  {
    "id": 1,
    "userId": 1,
    "createdAt": "2026-11-10T18:24:00.000Z",
    "updatedAt": "2026-11-10T18:24:00.000Z",
    "type": "Neutral",
    "title": "Clutch on Ascent",
    "message": "OK",
    "status": "Unread",
    "metadata": null
  }
]

Get a user's sessions: the devices signed in and the upload tokens

get/users/:userId/sessions

Tokens aren't part of it: a token is shown once, when its session is created. Apps' tokens are the connected apps (`/users/:userId/connected-apps`).

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
Signing in, sessions and upload tokens are the account's own. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a list of Sessions, each plus this field:

  • currentboolean

    Whether this is the session the request was made with.

Request
curl 'https://api.hematite.gg/v1/users/1/sessions' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  {
    "id": 1,
    "userId": 1,
    "type": "Upload",
    "publicId": "m0plGGtn67kMZy6D",
    "createdAt": "2026-11-10T18:24:00.000Z",
    "usedAt": "2026-11-10T18:24:00.000Z",
    "expiresAt": "2027-11-10T18:24:00.000Z",
    "ip": "203.0.113.7",
    "device": "Mozilla/5.0",
    "note": "ShareX",
    "current": false
  }
]

Get a user's showcase: the shots pinned at the top of their page, in their order

get/users/:userId/showcase

The user gets every pin, those that don't show to anyone else too. Anyone else gets only the pins whose image is Public, showing who uploaded it (not `hideUser`) and not marked NSFW, and none at all when fewer than 3 are, or when the user hides their page.

Needs
No token needed
Anyone may call it.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
images:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a list of Images.

Request
curl 'https://api.hematite.gg/v1/users/1/showcase'
Example data
[
  {
    "id": 1,
    "userId": 1,
    "createdAt": "2026-11-10T18:24:00.000Z",
    "updatedAt": "2026-11-10T18:24:00.000Z",
    "title": "Clutch on Ascent",
    "description": "1v4 on the last round",
    "visibility": "Unlisted",
    "folderId": 1,
    "views": 0,
    "downloads": 0,
    "favorite": false,
    "application": "VALORANT",
    "filename": "a1b2c3d4e5f6.png",
    "size": 2457600,
    "width": 1920,
    "height": 1080,
    "nsfw": false,
    "storageId": 1,
    "autoDeleteAt": null,
    "hideUser": false,
    "shield": false,
    "nsfwLockedAt": "2026-11-10T18:24:00.000Z",
    "privateLockedAt": "2026-11-10T18:24:00.000Z",
    "offlineAt": "2026-11-10T18:24:00.000Z",
    "storage": {
      "key": "images/a1b2c3d4e5f6.png"
    },
    "shareId": 1,
    "shareCode": "x7Kp2QmA",
    "likeCount": 0,
    "commentCount": 0,
    "meta": {
      "id": 1,
      "blurHash": "string",
      "dominantColor": "string",
      "palette": null,
      "hasAlpha": false,
      "animated": false,
      "orientation": 0
    },
    "treatment": "string",
    "burn": {
      "secondsPerView": 0,
      "viewsEach": 0,
      "viewsInAll": 0,
      "then": "Blur",
      "viewsUsed": 0,
      "burnedAt": "string"
    }
  }
]

Pin shots to your showcase, in this order, replacing what was pinned

put/users/:userId/showcase

Each must be one of your own images, Public, showing who uploaded it (not `hideUser`) and not marked NSFW; if one isn't, nothing changes. Others see the showcase once at least 3 of them show. Returns every pin, as you see it.

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
30 a minute
Per address, for this endpoint.
App scope
users:write
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Body

  • imageIdsinteger[]required

    Ids of your own images, 6 at most, in the order they show. An empty list unpins them all.

    At most 6 items, no repeats

Response

Returns a list of Images.

Errors of its own

  • 403Only your own showcase can be set

  • 404There's no user with this id

  • 422

Request
curl -X PUT 'https://api.hematite.gg/v1/users/1/showcase' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"imageIds":[1]}'
Example data
[
  {
    "id": 1,
    "userId": 1,
    "createdAt": "2026-11-10T18:24:00.000Z",
    "updatedAt": "2026-11-10T18:24:00.000Z",
    "title": "Clutch on Ascent",
    "description": "1v4 on the last round",
    "visibility": "Unlisted",
    "folderId": 1,
    "views": 0,
    "downloads": 0,
    "favorite": false,
    "application": "VALORANT",
    "filename": "a1b2c3d4e5f6.png",
    "size": 2457600,
    "width": 1920,
    "height": 1080,
    "nsfw": false,
    "storageId": 1,
    "autoDeleteAt": null,
    "hideUser": false,
    "shield": false,
    "nsfwLockedAt": "2026-11-10T18:24:00.000Z",
    "privateLockedAt": "2026-11-10T18:24:00.000Z",
    "offlineAt": "2026-11-10T18:24:00.000Z",
    "storage": {
      "key": "images/a1b2c3d4e5f6.png"
    },
    "shareId": 1,
    "shareCode": "x7Kp2QmA",
    "likeCount": 0,
    "commentCount": 0,
    "meta": {
      "id": 1,
      "blurHash": "string",
      "dominantColor": "string",
      "palette": null,
      "hasAlpha": false,
      "animated": false,
      "orientation": 0
    },
    "treatment": "string",
    "burn": {
      "secondsPerView": 0,
      "viewsEach": 0,
      "viewsInAll": 0,
      "then": "Blur",
      "viewsUsed": 0,
      "burnedAt": "string"
    }
  }
]

Get your standing (Settings → Standing): one of `Good`, `Warned`, `AtRisk`, `Suspended`; how many strikes count now and when the first of them ends; a suspension's end; the decisions about your things and your account, newest first, with each statement of reasons as it was sent; and your images locked Private or NSFW by a decision

get/users/:userId/standing

A strike counts 90 days, 180 for harassment, hate, scams and impersonation. Only your own, a suspended account's too; apps can't read it.

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
An account's standing is between its owner and hematite, read on hematite. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a Standing.

Request
curl 'https://api.hematite.gg/v1/users/1/standing' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "state": "Good",
  "activeStrikes": 0,
  "suspendedUntil": "2026-11-10T18:24:00.000Z",
  "soonest": {
    "givenAt": "2026-11-10T18:24:00.000Z",
    "endsAt": "2026-11-10T18:24:00.000Z"
  },
  "nameLocked": false,
  "stylesLocked": false,
  "decisions": [
    {
      "id": 1,
      "ref": "string",
      "kind": "NoBreach",
      "with": [
        "NoBreach"
      ],
      "targetType": "Image",
      "targetId": "string",
      "parts": [
        "name"
      ],
      "ground": "Law",
      "groundRef": "string",
      "strike": {
        "endsAt": "2026-11-10T18:24:00.000Z",
        "counting": false
      },
      "until": "2026-11-10T18:24:00.000Z",
      "statement": "string",
      "createdAt": "2026-11-10T18:24:00.000Z",
      "image": {
        "id": 1,
        "key": "images/a1b2c3d4e5f6.png",
        "nsfw": false
      }
    }
  ],
  "restricted": [
    {
      "imageId": 1,
      "title": "Clutch on Ascent",
      "lock": "Private",
      "ref": "string"
    }
  ]
}

Get where a user's storage goes: by kind and visibility, the last 30 days' uploads, and what could be cleared

get/users/:userId/storage

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns an object with these fields:

  • imageCountinteger
  • bytesnumber
  • byKindobject[]
  • byVisibilityobject[]
  • daysobject[]
  • neverViewedobject
  • olderThanYearobject
  • overQuotaobject
Request
curl 'https://api.hematite.gg/v1/users/1/storage' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "imageCount": 1,
  "bytes": 0,
  "byKind": [
    {
      "kind": "PNG",
      "count": 0,
      "bytes": 0
    }
  ],
  "byVisibility": [
    {
      "visibility": "Unlisted",
      "count": 0,
      "bytes": 0
    }
  ],
  "days": [
    {
      "date": "string",
      "count": 0,
      "bytes": 0
    }
  ],
  "neverViewed": {
    "count": 0,
    "bytes": 0
  },
  "olderThanYear": {
    "count": 0,
    "bytes": 0
  },
  "overQuota": {
    "count": 0,
    "bytes": 0
  }
}

Your two-step sign-in: whether it's on, the authenticator app and the passkeys with when each was added and last used, how many recovery codes are left, and until when this sign-in's step-up holds

get/users/:userId/two-factor

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
Signing in, sessions and upload tokens are the account's own. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns an object with these fields:

  • enabledboolean

    On while the account has an authenticator app or a passkey.

  • totpobject | null

    The authenticator app, once a code from it confirmed it.

  • passkeysobject[]
  • recoveryCodesobject | null

    How many of the recovery codes are left; null while two-step sign-in is off.

  • methodsenum[]

    One ofpasskeytotprecovery

  • stepUpUntildate-time | null

    Until when this sign-in's step-up holds (POST /auth/reauth); null when it has none: changes here ask for one first.

  • suggestedboolean

    While it's off: whether Settings → Security suggests it, for an account with a custom domain, an app or a paid plan.

Request
curl 'https://api.hematite.gg/v1/users/1/two-factor' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "enabled": false,
  "totp": {
    "createdAt": "2026-11-10T18:24:00.000Z",
    "lastUsedAt": "2026-11-10T18:24:00.000Z"
  },
  "passkeys": [
    {
      "id": 1,
      "name": "Ranked",
      "createdAt": "2026-11-10T18:24:00.000Z",
      "lastUsedAt": "2026-11-10T18:24:00.000Z"
    }
  ],
  "recoveryCodes": {
    "left": 0,
    "total": 0,
    "createdAt": "2026-11-10T18:24:00.000Z"
  },
  "methods": [
    "passkey"
  ],
  "stepUpUntil": "2026-11-10T18:24:00.000Z",
  "suggested": false
}

Adds a passkey: the browser's answer to the options from `POST /users/:userId/two-factor/passkeys/options`, and its name

post/users/:userId/two-factor/passkeys

The first method also turns two-step sign-in on and answers its ten recovery codes, shown only now. Needs a fresh step-up.

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
Signing in, sessions and upload tokens are the account's own. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

Body

  • namestringrequired

    What to call it, so you know which device it is ("MacBook").

    1 to 64 characters

  • responseobjectrequired

    What the browser's navigator.credentials.create() answered, as JSON (WebAuthn's RegistrationResponseJSON; startRegistration() of @simplewebauthn/browser gives it).

Response

Returns an object with these fields:

  • passkeyobject
  • recoveryCodesstring[] | null

    The ten recovery codes when this turned two-step sign-in on, shown only now; null when it was on already.

Request
curl -X POST 'https://api.hematite.gg/v1/users/1/two-factor/passkeys' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Ranked","response":{"id":"string","rawId":"string","type":"public-key","authenticatorAttachment":"platform","clientExtensionResults":{"clientExtensionResultsKey":null},"response":{"clientDataJSON":"string","attestationObject":"string","authenticatorData":"string","transports":["string"],"publicKeyAlgorithm":0,"publicKey":"string"}}}'
Example data
{
  "passkey": {
    "id": 1,
    "name": "Ranked",
    "createdAt": "2026-11-10T18:24:00.000Z",
    "lastUsedAt": "2026-11-10T18:24:00.000Z"
  },
  "recoveryCodes": [
    "string"
  ]
}

Renames a passkey

patch/users/:userId/two-factor/passkeys/:passkeyId

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
Signing in, sessions and upload tokens are the account's own. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

  • passkeyIdnumberrequired

Body

  • namestringrequired

    What to call it, so you know which device it is ("MacBook").

    1 to 64 characters

Response

Returns an object with these fields:

  • idinteger
  • namestring

    What its owner called it ("MacBook").

  • createdAtdate-time
  • lastUsedAtdate-time | null
Request
curl -X PATCH 'https://api.hematite.gg/v1/users/1/two-factor/passkeys/1' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Ranked"}'
Example data
{
  "id": 1,
  "name": "Ranked",
  "createdAt": "2026-11-10T18:24:00.000Z",
  "lastUsedAt": "2026-11-10T18:24:00.000Z"
}

Removes a passkey

delete/users/:userId/two-factor/passkeys/:passkeyId

Needs a fresh step-up; when it's the last method, two-step sign-in turns off with it and the recovery codes stop, which takes the password too.

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
Signing in, sessions and upload tokens are the account's own. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

  • passkeyIdnumberrequired

Body

  • passwordstring

    Your password: needed when this turns two-step sign-in off.

    At most 128 characters

Response

Returns an object with these fields:

  • enabledboolean

    Whether two-step sign-in is still on.

Request
curl -X DELETE 'https://api.hematite.gg/v1/users/1/two-factor/passkeys/1' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"password":"••••••••"}'
Example data
{
  "enabled": false
}

WebAuthn's options for adding a passkey: hand them to the browser (`startRegistration({ optionsJSON })` of `@simplewebauthn/browser`) and send its answer to `POST /users/:userId/two-factor/passkeys` within five minutes

post/users/:userId/two-factor/passkeys/options

Needs a fresh step-up.

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
Signing in, sessions and upload tokens are the account's own. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns an object with these fields:

  • rpobject
  • userobject
  • challengestring
  • pubKeyCredParamsobject[]
  • timeoutnumberoptional
  • excludeCredentialsobject[]optional
  • authenticatorSelectionobjectoptional
  • attestationenumoptional

    One ofdirectenterpriseindirectnone

Request
curl -X POST 'https://api.hematite.gg/v1/users/1/two-factor/passkeys/options' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "rp": {
    "name": "Ranked",
    "id": "string"
  },
  "user": {
    "id": "string",
    "name": "Ranked",
    "displayName": "Ranked"
  },
  "challenge": "string",
  "pubKeyCredParams": [
    {
      "alg": 0,
      "type": "public-key"
    }
  ],
  "timeout": 0,
  "excludeCredentials": [
    {
      "id": "string",
      "type": "public-key",
      "transports": [
        "ble"
      ]
    }
  ],
  "authenticatorSelection": {
    "authenticatorAttachment": "platform",
    "requireResidentKey": false,
    "residentKey": "discouraged",
    "userVerification": "required"
  },
  "attestation": "direct"
}

A new set of ten recovery codes, shown only now; the old ones stop at once

post/users/:userId/two-factor/recovery-codes

Needs two-step sign-in on and a fresh step-up.

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
5 an hour
Per address, for this endpoint.
App scope
Not open to apps
Signing in, sessions and upload tokens are the account's own. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns an object with these fields:

  • recoveryCodesstring[]

    The ten new codes, shown only now.

Request
curl -X POST 'https://api.hematite.gg/v1/users/1/two-factor/recovery-codes' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "recoveryCodes": [
    "string"
  ]
}

Starts adding an authenticator app: a new secret, as text and as the `otpauth://` address its QR code carries

post/users/:userId/two-factor/totp

It's on once a code from the app confirms it (`POST /users/:userId/two-factor/totp/confirm`); until then it signs nobody in, and asking again makes a new one. Needs a fresh step-up (`POST /auth/reauth`).

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
Signing in, sessions and upload tokens are the account's own. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns an object with these fields:

  • secretstring

    The secret in base32, for an app on the same phone: typed in, or pasted.

  • otpauthUrlstring

    The otpauth://totp/… address, for a QR code an app scans.

Request
curl -X POST 'https://api.hematite.gg/v1/users/1/two-factor/totp' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "secret": "string",
  "otpauthUrl": "https://cdn.hematite.gg/images/a1b2c3d4e5f6.png"
}

Removes the authenticator app

delete/users/:userId/two-factor/totp

Needs a fresh step-up; when it's the last method, two-step sign-in turns off with it and the recovery codes stop, which takes the password too.

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
Signing in, sessions and upload tokens are the account's own. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

Body

  • passwordstring

    Your password: needed when this turns two-step sign-in off.

    At most 128 characters

Response

Returns an object with these fields:

  • enabledboolean

    Whether two-step sign-in is still on.

Request
curl -X DELETE 'https://api.hematite.gg/v1/users/1/two-factor/totp' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"password":"••••••••"}'
Example data
{
  "enabled": false
}

Turns the authenticator app on with a code from it

post/users/:userId/two-factor/totp/confirm

The first method also turns two-step sign-in on and answers its ten recovery codes, shown only now. Needs a fresh step-up.

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
Signing in, sessions and upload tokens are the account's own. Nor to API keys.

Path parameters

  • userIdrequired

    The user's id.

Body

  • codestringrequired

    The six digits the app shows now.

    At most 16 characters

Response

Returns an object with these fields:

  • recoveryCodesstring[] | null

    The ten recovery codes when this turned two-step sign-in on, shown only now; null when it was on already.

Request
curl -X POST 'https://api.hematite.gg/v1/users/1/two-factor/totp/confirm' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code":"x7Kp2QmA"}'
Example data
{
  "recoveryCodes": [
    "string"
  ]
}

Get a user's upload settings

get/users/:userId/upload-settings

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a UserUploadSettings.

Request
curl 'https://api.hematite.gg/v1/users/1/upload-settings' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "id": 1,
  "shareCodeMode": "Alphanumeric",
  "shareCodeLength": 8,
  "compressionQuality": 85,
  "visibility": "Unlisted",
  "watermarkMode": "None",
  "watermark": {
    "text": "string",
    "position": "top-left",
    "size": "small",
    "opacity": 0,
    "tone": "light"
  },
  "randomizeFilenames": false,
  "autoDeleteAfter": null,
  "shareUrlType": "Domain",
  "domainSubdomain": "string",
  "domainPath": "string",
  "embedStyleId": 1,
  "updatedAt": "2026-11-10T18:24:00.000Z",
  "embedStyle": {
    "id": 1,
    "key": "hematite",
    "name": "Ranked",
    "about": "string",
    "basedOn": "hematite",
    "version": 0,
    "author": "Uploader",
    "picture": "Large",
    "cropToCard": false,
    "colour": "Hematite",
    "colourHex": "string",
    "showTime": false,
    "motion": false,
    "title": "Clutch on Ascent",
    "description": "1v4 on the last round",
    "site": "Hematite",
    "siteText": "string"
  }
}

Update a user's upload settings

patch/users/:userId/upload-settings

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:write
What an app's token or an API key needs.
Apps can't send: embedStyle, embedStyleId

Path parameters

  • userIdrequired

    The user's id.

Body

Send at least one field.

  • shareCodeModeenum

    One ofAlphanumericLettersLowercaseNumbersHexadecimalUnambiguousEmojisMemorable

  • shareCodeLengthnumber

    1 to 32

  • compressionQualitynumber

    1 to 100

  • visibilityenum

    One ofUnlistedPublicPrivate

  • watermarkModeenum

    One ofNoneMinimalMediumFull

  • randomizeFilenamesboolean
  • autoDeleteAfterinteger | null

    How many minutes after its upload a new image deletes itself, or null to keep it. Maximum is 5259600 (10 years). Applies to every upload that doesn't set its own autoDeleteAt.

  • shareUrlTypeenum

    Where a new upload's link goes: its share page on the user's domain (Domain), or the file itself on the cdn (PermanentCDN), with the user's watermark when they have one.

    One ofDomainPermanentCDN

  • domainSubdomainstring

    The subdomain your links use on a domain that takes one: a DNS label (letters, digits and inner -, up to 63), not one hematite keeps (hosts such as www and api, staff, payment and sign-in words, brands, offensive words).

    Matches ^(?!-)[a-z0-9-]{1,63}(?<!-)$

  • domainPathstring

    Matches ^[A-Za-z0-9\-._~%!$&'()*+,;=:@]*$

  • watermarkobject | null

    The custom watermark, drawn while watermarkMode is Medium; null forgets it (and can't go with Medium).

  • embedStyleobjectApps can't send it

    The style your links' previews follow: a built-in as it is, or with your own choices and (from Silver) your own words and site line. Your choices are kept as a style of your own; the built-in's again, and its own style is what your links follow.

  • embedStyleIdintegerApps can't send it

    The style your links follow, as it is: a built-in's id or one of your own styles' (GET /users/:userId/embed-styles). embedStyle sets it with your own choices instead; send one of the two

Response

Returns a UserUploadSettings.

Errors of its own

  • 400A custom watermark needs its text

  • 403

  • 404No such style of yours

  • 409

  • 422

Request
curl -X PATCH 'https://api.hematite.gg/v1/users/1/upload-settings' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"shareCodeMode":"Alphanumeric"}'
Example data
{
  "id": 1,
  "shareCodeMode": "Alphanumeric",
  "shareCodeLength": 8,
  "compressionQuality": 85,
  "visibility": "Unlisted",
  "watermarkMode": "None",
  "watermark": {
    "text": "string",
    "position": "top-left",
    "size": "small",
    "opacity": 0,
    "tone": "light"
  },
  "randomizeFilenames": false,
  "autoDeleteAfter": null,
  "shareUrlType": "Domain",
  "domainSubdomain": "string",
  "domainPath": "string",
  "embedStyleId": 1,
  "updatedAt": "2026-11-10T18:24:00.000Z",
  "embedStyle": {
    "id": 1,
    "key": "hematite",
    "name": "Ranked",
    "about": "string",
    "basedOn": "hematite",
    "version": 0,
    "author": "Uploader",
    "picture": "Large",
    "cropToCard": false,
    "colour": "Hematite",
    "colourHex": "string",
    "showTime": false,
    "motion": false,
    "title": "Clutch on Ascent",
    "description": "1v4 on the last round",
    "site": "Hematite",
    "siteText": "string"
  }
}

Get your username history: each change from an old username to a new one, and when

get/users/:userId/usernames

Anyone else's is an empty list; their current username is on the user.

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:read
What an app's token or an API key needs.

Path parameters

  • userIdrequired

    The user's id.

Response

Returns a list of Usernames.

Request
curl 'https://api.hematite.gg/v1/users/1/usernames' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  {
    "id": 1,
    "userId": 1,
    "oldUsername": "stella",
    "newUsername": "nova",
    "createdAt": "2026-11-10T18:24:00.000Z"
  }
]

Get the signed-in user

get/users/@me

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:read
What an app's token or an API key needs.

Response

Returns a User.

Request
curl 'https://api.hematite.gg/v1/users/@me' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "id": 1,
  "username": "nova",
  "email": "nova@example.com",
  "emailConfirmedAt": "2026-11-10T18:24:00.000Z",
  "createdAt": "2026-11-10T18:24:00.000Z",
  "updatedAt": "2026-11-10T18:24:00.000Z",
  "permissionGroupId": 1,
  "subscriptionGroupId": 1,
  "stripeSubscriptionId": "string",
  "domainId": 1,
  "avatarId": 1,
  "stripeCustomerId": "string",
  "inviteId": 1,
  "timeZone": "string",
  "avatar": {
    "key": "images/a1b2c3d4e5f6.png"
  },
  "badgeIds": [
    1
  ],
  "storageUsed": 2457600,
  "storageLimit": 1073741824,
  "imageCount": 1,
  "folderCount": 0,
  "publicImageCount": 0,
  "publicFolderCount": 0,
  "profile": {
    "bio": "Screenshots from ranked nights",
    "hideProfile": false,
    "activityVisibility": "All"
  }
}

Get many users by IDs

get/users/bulk

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:read
What an app's token or an API key needs.

Query

  • idsnumber[]required

    Ids of users. If any has no user, the request is refused.

    1 to 20 items, no repeats

  • partialboolean

    Defaultfalse

Response

Returns a list, each a User, a HiddenUser or a PartialUser.

Request
curl 'https://api.hematite.gg/v1/users/bulk?ids=1' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
[
  {
    "id": 1,
    "username": "nova",
    "email": "nova@example.com",
    "emailConfirmedAt": "2026-11-10T18:24:00.000Z",
    "createdAt": "2026-11-10T18:24:00.000Z",
    "updatedAt": "2026-11-10T18:24:00.000Z",
    "permissionGroupId": 1,
    "subscriptionGroupId": 1,
    "stripeSubscriptionId": "string",
    "domainId": 1,
    "avatarId": 1,
    "stripeCustomerId": "string",
    "inviteId": 1,
    "timeZone": "string",
    "avatar": {
      "key": "images/a1b2c3d4e5f6.png"
    },
    "badgeIds": [
      1
    ],
    "storageUsed": 2457600,
    "storageLimit": 1073741824,
    "imageCount": 1,
    "folderCount": 0,
    "publicImageCount": 0,
    "publicFolderCount": 0,
    "profile": {
      "bio": "Screenshots from ranked nights",
      "hideProfile": false,
      "activityVisibility": "All"
    }
  }
]

Check if a username is available

post/users/check-username

Needs
No token needed
Anyone may call it.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:read
What an app's token or an API key needs.

Body

  • usernamestringrequired

    The username to check

    3 to 64 characters, matches ^[a-zA-Z0-9_]+$

Response

Returns an object with these fields:

  • availableboolean

    Whether the username is available

  • reasonenum | null

    Why it isn't, or null when it is: taken, someone has it; held, its last owner gave it up less than 30 days ago and only they may take it back (they're told it's available); kept, hematite keeps it (its own pages, hosts and staff, payment and sign-in words, brands, offensive words), compared as it reads: case, look-alike letters, digits for letters and separators folded.

    One oftakenheldkept

Request
curl -X POST 'https://api.hematite.gg/v1/users/check-username' \
  -H "Content-Type: application/json" \
  -d '{"username":"nova"}'
Example data
{
  "available": false,
  "reason": "taken"
}

Search for users

post/users/search

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
users:read
What an app's token or an API key needs.
Apps can't filter by: email

Body

  • limitinteger

    Default100

    More than 0

  • offsetinteger

    Default0

    At least 0

  • queryobject
  • orderobject
  • filterobject[]Apps can't filter by email
  • partialboolean

    Defaultfalse

Response

Returns an object with these fields:

Request
curl -X POST 'https://api.hematite.gg/v1/users/search' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"limit":100}'
Example data
{
  "results": [
    {
      "id": 1,
      "username": "nova",
      "email": "nova@example.com",
      "emailConfirmedAt": "2026-11-10T18:24:00.000Z",
      "createdAt": "2026-11-10T18:24:00.000Z",
      "updatedAt": "2026-11-10T18:24:00.000Z",
      "permissionGroupId": 1,
      "subscriptionGroupId": 1,
      "stripeSubscriptionId": "string",
      "domainId": 1,
      "avatarId": 1,
      "stripeCustomerId": "string",
      "inviteId": 1,
      "timeZone": "string",
      "avatar": {
        "key": "images/a1b2c3d4e5f6.png"
      },
      "badgeIds": [
        1
      ],
      "storageUsed": 2457600,
      "storageLimit": 1073741824,
      "imageCount": 1,
      "folderCount": 0,
      "publicImageCount": 0,
      "publicFolderCount": 0,
      "profile": {
        "bio": "Screenshots from ranked nights",
        "hideProfile": false,
        "activityVisibility": "All"
      }
    }
  ],
  "total": 0
}