Flairs V1
Create User Flair V1
Create or update a user flair template. Provide flair_template_id to update an existing template. Requires mod permissions.
POST /api/v1/communities/{name}/create-flair-template
Create or update a user flair template. Provide flair_template_id to update an existing template. Requires mod permissions.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Subreddit name. |
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Flair text (max 64 characters). |
background_color | string | No | Hex background color (e.g. #ff4500). |
flair_template_id | string | No | Existing template ID to update (omit to create new). |
css_class | string | No | CSS class for old Reddit styling. |
bearer | string | No | Bearer token. Optional if stored in Token Vault. |
text_editable | string | No | Allow users to edit flair text. true or false (default: false). |
proxy | string | No | Proxy. Optional if stored in Token Vault. |
allowable_content | string | No | Allowed content: all, emoji, or text. |
text_color | string | No | Text color: light or dark. |
mod_only | string | No | Only mods can assign this flair. true or false (default: false). |
max_emojis | string | No | Max emojis allowed (default: 10). |
Authentication
| Header | Value |
|---|---|
X-RapidAPI-Key | Your RapidAPI key |
X-RapidAPI-Host | red-crawler1.p.rapidapi.com |
Example request
cURL
curl -X POST "https://red-crawler1.p.rapidapi.com/api/v1/communities/pcmasterrace/create-flair-template" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: red-crawler1.p.rapidapi.com" \
-H "Content-Type: application/json" \
--data '{"text": "<text>", "background_color": "<background_color>", "flair_template_id": "<flair_template_id>", "css_class": "<css_class>", "bearer": "<bearer>", "text_editable": "false", "proxy": "<proxy>", "allowable_content": "all", "text_color": "dark", "mod_only": "false", "max_emojis": "10"}'JavaScript
const res = await fetch("https://red-crawler1.p.rapidapi.com/api/v1/communities/pcmasterrace/create-flair-template", {
method: "POST",
headers: {
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
"X-RapidAPI-Host": "red-crawler1.p.rapidapi.com"
},
body: JSON.stringify({
"text": "<text>",
"background_color": "<background_color>",
"flair_template_id": "<flair_template_id>",
"css_class": "<css_class>",
"bearer": "<bearer>",
"text_editable": "false",
"proxy": "<proxy>",
"allowable_content": "all",
"text_color": "dark",
"mod_only": "false",
"max_emojis": "10"
})
});
const data = await res.json();
console.log(data);Python
import requests
url = "https://red-crawler1.p.rapidapi.com/api/v1/communities/pcmasterrace/create-flair-template"
headers = {
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
"X-RapidAPI-Host": "red-crawler1.p.rapidapi.com",
"Content-Type": "application/json"
}
payload = {
"text": "<text>",
"background_color": "<background_color>",
"flair_template_id": "<flair_template_id>",
"css_class": "<css_class>",
"bearer": "<bearer>",
"text_editable": "false",
"proxy": "<proxy>",
"allowable_content": "all",
"text_color": "dark",
"mod_only": "false",
"max_emojis": "10"
}
resp = requests.post(url, headers=headers, json=payload)
print(resp.json())Example response
HTTP 200 — captured from a live call to the gateway.
{
"success": true,
"data": {
"text": "User flair",
"allowableContent": "all",
"modOnly": false,
"cssClass": "",
"id": "97b38fbc-43b4-11f1-9bf2-5a1fc0bd4d8e",
"textEditable": false,
"overrideCss": false,
"richtext": [
{
"e": "text",
"t": "User flair"
}
],
"maxEmojis": 5,
"flairType": "USER_FLAIR",
"backgroundColor": "",
"textColor": "light",
"type": "richtext"
},
"error": null,
"timestamp": "2026-04-29T10:17:14.584621+00:00"
}