Toolbox persists all subreddit-level moderation data in Reddit wiki pages. Every data store follows the same pattern: a JSON object with aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/toolbox-team/reddit-moderator-toolbox/llms.txt
Use this file to discover all available pages before exploring further.
ver field for schema validation, written to a specific named wiki page within the target subreddit.
Wiki pages
| Data store | Wiki page | Format |
|---|---|---|
| Usernotes | usernotes | JSON with zlib-compressed blob field |
| Subreddit config | toolbox | Plain JSON |
| Ban macros | banmacros | Plain JSON |
Reddit API endpoints
Reading a page
data.content_md:
content_md as JSON to get the Toolbox data object.
Writing a page
| Parameter | Description |
|---|---|
page | Wiki page name (e.g. usernotes, toolbox) |
content | The full page content as a string |
reason | Edit reason shown in wiki revision history |
uh | Modhash for CSRF protection |
Toolbox appends
" via toolbox" to all edit reasons. Third-party tools should similarly identify themselves in the reason parameter so moderators can trace edits in the wiki history.Schema versioning
Every Toolbox data object includes aver integer field. Toolbox validates this version before reading or writing to prevent data corruption from incompatible schema changes.
tbcore.js):
| Data store | Min supported | Deprecated | Current | Max accepted |
|---|---|---|---|---|
| Usernotes | 4 | 4 | 6 | 6 |
| Config | 1 | — | 1 | 1 |
Usernotes compression
Usernotes data can be large for active subreddits. Toolbox compresses the notes payload before storing it to stay within Reddit’s wiki page size limits.Structure before compression
The notes data is a JSON object mapping lowercase usernames to arrays of note objects:
Compress with zlib
Serialize the notes object to a JSON string, then compress it using zlib (deflate). Toolbox uses the pako library in the browser:
Base64-encode the result
Encode the compressed bytes as a base64 string. This becomes the
blob field in the stored JSON:blob, inflate with zlib, then parse the resulting JSON string.
Error handling
WhenreadFromWiki in tbapi.ts encounters a failure, it resolves (not rejects) with one of two sentinel values:
| Value | Meaning |
|---|---|
NO_WIKI_PAGE | The page does not exist or the wiki is disabled |
WIKI_PAGE_UNKNOWN | The page exists but the request failed for an unknown reason |
NO_WIKI_PAGE as an empty data store (safe to initialize) and WIKI_PAGE_UNKNOWN as a transient error that should not trigger a write.