Skip to content
Micup API

Badges

The badge inventory lists every badge the caller owns, hidden ones included. Hiding a badge only removes it from what other readers see, and the caller keeps it.

Every route here requires a user session. A bot or OAuth2 bearer credential is refused with 403 ACCESS_DENIED.

A badge comes from one of two sources. A built-in badge follows from the account itself: an account flag or its premium state. A catalog badge is one of the badges an Admin gives to the account.

One built-in badge the caller owns.

FieldTypeDescription
source1stringflag or premium
key2stringWhich built-in badge this is
visiblebooleanWhether other readers see the badge

1 flag for staff, partner and bug_hunter, and premium for the other keys

2 One of the keys in Built-in badge keys

KeyOwned while
staffThe account has the STAFF user flag
partnerThe account has the PARTNER user flag
bug_hunterThe account has the BUG_HUNTER user flag
premiumThe account has premium
premium_packageThe account has a lasting package badge and no lifetime premium
premium_sequenceThe account has lifetime premium with a sequence number

Hiding any key except premium_sequence removes the matching flags from the account’s public flags: PREMIUM_BADGE for premium, and every package badge flag for premium_package. Hiding premium_sequence removes the lifetime sequence from the public profile.

One catalog badge the caller owns.

FieldTypeDescription
sourcestringAlways catalog
badge_idsnowflakeThe ID of the badge
visiblebooleanWhether the badge shows on the caller’s profile
iconstringThe hash of the badge icon
description1stringThe text shown for the badge

1 A numbered badge has {n} replaced by the caller’s number

FieldTypeDescription
badges1array[built-in badge object]Every built-in badge the caller owns
catalog2array[catalog badge object]One page of the catalog badges the caller owns
next_cursor3?snowflakeThe after value of the next page, or null on the last page

1 At most six entries, never paged, in the order of Built-in badge keys

2 In ascending badge ID order. A badge that was removed from the catalog is left out, so a page can hold fewer entries than limit while more remain

3 The ID of the last badge on the page

{
"badges": [
{"source": "flag", "key": "bug_hunter", "visible": true},
{"source": "premium", "key": "premium", "visible": false}
],
"catalog": [
{
"source": "catalog",
"badge_id": "1215712461409427456",
"visible": true,
"icon": "9f3c2b1a",
"description": "Pioneer #1234"
}
],
"next_cursor": null
}
GET/v1/users/@me/badges

Returns the caller’s badge inventory. Read the next page of catalog badges with next_cursor as after, and stop when next_cursor is null. Every page repeats the built-in badges.

Micup rejects any other query parameter with 400 INVALID_FORM_BODY.

FieldTypeDescription
after?snowflakeThe cursor selecting catalog badges with IDs above this badge ID
limit?integerThe maximum number of catalog badges to return (1-100, default 50)
StatusBodyCondition
200badge inventory objectThe inventory was returned

60 requests per minute for each authenticated user, on the user:badge:inventory bucket.

PATCH/v1/users/@me/badges

Shows or hides one badge the caller owns. Returns 204 with an empty body.

The route works only while the instance has badge inventory settings turned on. Otherwise it returns 403 MISSING_PERMISSIONS and changes nothing.

Micup rejects any other field with 400 INVALID_FORM_BODY.

FieldTypeDescription
badge1stringA built-in badge key or the ID of a catalog badge
visiblebooleanWhether the badge shows to other readers

1 A catalog badge ID is a positive decimal number of at most 19 digits

StatusBodyCondition
204emptyThe visibility was set
403error responseBadge inventory settings are turned off and the request returns MISSING_PERMISSIONS
404error responseThe caller does not own the badge and the request returns NOT_FOUND

A built-in badge change sends User Update to the caller’s sessions. A catalog badge change sends no Gateway event; the next profile read shows the new state.

30 requests per minute for each authenticated user, on the user:badge:visibility bucket.