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.

Branches are the community containers in Artemis — each branch has its own subscribers, moderators, rules, and post feed. The Branches API lets you enumerate available branches, read metadata, subscribe or unsubscribe users, create new branches, search within a branch, and compose multi-branch feeds. Routes follow the /r/:branch/ prefix for branch-specific actions and /branches/ for site-wide branch listings.

GET /branches/:where.json

Returns a paginated listing of branches across the site. Replace :where with one of the recognized category names.
where
string
required
The listing category. One of popular, new, default, gold, or employee.
after
string
Fullname cursor for forward pagination.
before
string
Fullname cursor for backward pagination.
limit
number
default:"25"
Number of branches to return. Maximum is 100.
curl "https://<your-artemis-instance>/branches/popular.json?limit=5"
{
  "kind": "Listing",
  "data": {
    "after": "t5_xyz99",
    "before": null,
    "children": [
      {
        "kind": "t5",
        "data": {
          "display_name": "programming",
          "title": "Programming",
          "subscribers": 84200,
          "public_description": "Computer programming discussion.",
          "over18": false,
          "url": "/r/programming/"
        }
      }
    ]
  }
}
display_name
string
The branch’s URL slug (e.g. programming).
title
string
The branch’s display title.
subscribers
number
Total subscriber count.
public_description
string
Short description shown in listings.
over18
boolean
Whether the branch is marked as NSFW.
url
string
The branch’s relative URL.

GET /r/:branch/about.json

Returns full metadata for a single branch.
branch
string
required
The branch name (URL slug).
curl https://<your-artemis-instance>/r/programming/about.json
{
  "kind": "t5",
  "data": {
    "id": "2fwo",
    "display_name": "programming",
    "title": "Programming",
    "public_description": "Computer programming discussion.",
    "description": "Full sidebar text in Markdown.",
    "subscribers": 84200,
    "active_user_count": 312,
    "submit_text": "",
    "over18": false,
    "url": "/r/programming/",
    "subreddit_type": "public",
    "submission_type": "any"
  }
}
id
string
The branch’s base-36 ID.
active_user_count
number
Approximate number of users currently browsing the branch.
description
string
Full sidebar text in raw Markdown.
submit_text
string
Text shown on the submission form, set by moderators.
subreddit_type
string
Visibility setting: public, restricted, or private.
submission_type
string
Allowed post kinds: any, link, or self.

POST /api/subscribe

Subscribes or unsubscribes the authenticated user from a branch. Requires the subscribe OAuth2 scope.
action
string
required
Use sub to subscribe or unsub to unsubscribe.
sr
string
The fullname of the branch (e.g. t5_2fwo). Provide either sr or sr_name.
sr_name
string
The display name of the branch (e.g. programming). Provide either sr or sr_name.
curl -X POST https://<your-artemis-instance>/api/subscribe \
  -H "Authorization: Bearer <token>" \
  -d "action=sub&sr_name=programming"
Subscribing to a private branch requires that the authenticated user already has view access to it.

POST /branches/create

Renders the branch creation form (GET) and processes a new branch submission. In the API context this route corresponds to the newartemis action in the front controller. Authentication is required.
name
string
Pre-fills the branch name field when loading the creation form via GET.
After creating a branch, moderators can configure its settings, rules, sidebar, and stylesheet through the branch’s /about/edit page or the moderation API.

GET /r/:branch/search.json

Searches within a specific branch’s posts.
branch
string
required
The branch name to restrict the search to.
q
string
required
The search query string.
sort
string
default:"relevance"
Sort order for results. One of relevance, hot, top, new, or comments.
t
string
default:"all"
Time window when sort is top. One of hour, day, week, month, year, or all.
limit
number
default:"25"
Number of results to return. Maximum is 100.
after
string
Fullname cursor for forward pagination.
curl "https://<your-artemis-instance>/r/programming/search.json?q=python&sort=hot&limit=10"

Multi-branch feeds

Multi-branch feeds let a user combine several branches into a single listing view. The route follows the pattern /user/:username/m/:multipath.
username
string
required
The owner of the multi-branch feed.
multipath
string
required
The slug identifying the multi-branch feed within the user’s account.
# GET the hot listing for a user's multi-branch feed
curl -H "Authorization: Bearer <token>" \
     https://<your-artemis-instance>/user/alice/m/myfeed/hot.json
The multi-branch feed also supports the same sort routes as a regular branch: hot, new, rising, top, and controversial. You can manage multi-branch feeds programmatically through the /api/multi/ endpoints:
MethodPathDescription
GET/api/multi/mineList the current user’s multi-branch feeds.
GET/api/multi/user/:usernameList multi-branch feeds owned by a specific user.
GET/PUT/DELETE/api/multi/*multipathRead, create/update, or delete a multi-branch feed.
GET/PUT/DELETE/api/multi/*multipath/r/:srnameRead, add, or remove a branch from a feed.
GET/PUT/api/multi/*multipath/descriptionRead or update the feed’s description.
POST/api/multi/copyCopy an existing multi-branch feed.
POST/api/multi/renameRename a multi-branch feed.

Branch about pages

Several sub-pages under /r/:branch/about/ expose branch-level metadata and moderation surfaces:
PathDescription
/r/:branch/about/rulesThe branch’s posted rules.
/r/:branch/about/sidebarThe branch sidebar text.
/r/:branch/about/stickyThe branch’s stickied post.
/r/:branch/about/flairFlair template listing for the branch.
/r/:branch/about/editBranch settings editor (moderators only).
/r/:branch/about/trafficTraffic statistics (moderators only).
The /about/edit and /about/traffic pages require moderator permissions for the branch. Accessing them without the correct session or OAuth2 scope returns 403 Forbidden.

Build docs developers (and LLMs) love