Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/artemis-development-group/artemis/llms.txt

Use this file to discover all available pages before exploring further.

Flair is a labeling system that lets branch moderators attach visible badges to users and posts within their community. User flair appears next to a member’s username in the branch; link flair appears as a tag on posts. Moderators create flair templates that define the available text and CSS styling, and can choose whether members may assign their own flair or only moderators can set it. This page covers both flair types, template management, assignment workflows, and the API endpoints for programmatic flair management.

Flair types

There are two distinct flair types in Artemis, defined as constants in the flair model:
TypeConstantWhere it appears
User flairUSER_FLAIRNext to the user’s username in the branch
Link flairLINK_FLAIRAs a tag label on a post within the branch
Both types use the same FlairTemplate model, but are stored and indexed separately per branch.

Branch flair settings

Moderators control flair behavior through the following settings on the branch, accessible at /r/:branchname/about/edit:
SettingDefaultDescription
flair_enabledtrueWhether user flair is shown in the branch
flair_positionrightWhere user flair appears relative to the username: left or right
link_flair_position“ (empty)Where link flair appears on a post: left, right, or empty (hidden)
flair_self_assign_enabledfalseWhether users can pick their own user flair from templates
link_flair_self_assign_enabledfalseWhether users can pick link flair when submitting a post

Flair templates

A FlairTemplate defines a reusable flair option with:
  • text — the display label (can be empty)
  • css_class — a CSS class applied to the flair element for styling
  • text_editable — whether users can customize the text when selecting this template
Each branch can have up to 350 flair templates per flair type.

Managing flair templates

Moderators manage user flair templates at:
/r/:branchname/about/flair
1

Open the flair listing

Navigate to /r/:branchname/about/flair.
2

Fill in the template fields

Enter the Flair text (optional), the CSS class (optional), and check Allow users to edit flair text if the text should be editable by members.
3

Save

Click Add flair template. The template is immediately available for assignment.

Assigning flair

User flair

Moderators can set any user’s flair in their branch via the flair listing at /r/:branchname/about/flair, or via the API:
POST /api/flair
ParameterTypeDescription
namestringThe username to assign flair to
textstringFlair text
css_classstringCSS class to apply
flair_template_idstringUUID of an existing template (optional)
Moderators can set or update link flair on any post in the branch:
POST /api/flair
ParameterTypeDescription
linkstringFullname of the post (e.g. t3_abc123)
textstringFlair text
css_classstringCSS class
flair_template_idstringUUID of an existing link flair template (optional)

Bulk flair management

Moderators can set flair for multiple users at once by uploading a CSV:
POST /api/flaircsv
The CSV format is one entry per line:
username,flair_text,css_class
alice,Moderator,mod-badge
bob,Veteran,veteran
carol,,special-icon
The flaircsv endpoint updates each user’s flair in the branch. Users not included in the CSV are unaffected.

Clearing flair

To remove flair from a user or post, send an empty text and css_class with no flair_template_id:
POST /api/flair
name=alice&text=&css_class=
Or use the dedicated clear endpoint:
POST /api/clearflairtemplates
flair_type=USER_FLAIR
This removes all flair templates for the specified type from the branch.

CSS classes for flair styling

The css_class field on a flair template maps to a class on the flair <span> element in the branch stylesheet. Moderators define the appearance of each class in config/stylesheet.
/* config/stylesheet example */
.flair-mod-badge {
    background-image: url(%%mod-icon%%);
    background-repeat: no-repeat;
    padding-left: 20px;
    color: #ff4500;
}

.flair-veteran {
    color: #46d160;
    font-weight: bold;
}
Use %%image_name%% syntax in the stylesheet to reference images uploaded to the branch via /r/:branchname/about/stylesheet. This keeps image URLs stable even if the CDN path changes.

Flair API reference summary

EndpointMethodPurpose
/api/flairPOSTSet flair on a user or link
/api/flairlistGETList user flair in the branch
/api/flaircsvPOSTBulk-set user flair via CSV
/api/flairtemplatePOSTCreate or update a flair template
/api/deleteflairtemplatePOSTDelete a specific flair template
/api/clearflairtemplatesPOSTRemove all templates of a given type
/api/selectflairPOSTUser self-assigns a flair template
/api/setflairenabledPOSTToggle flair display on or off for the calling user

Build docs developers (and LLMs) love