This is automatically-generated documentation for the reddit API.

The reddit API and code are open source. Found a mistake or interested in helping us improve? Have a gander at api.py and send us a pull request.

Please take care to respect our API access rules.

overview

listings

Many endpoints on reddit use the same protocol for controlling pagination and +filtering. These endpoints are called Listings and share five common +parameters: after / before, limit, count, and show.

+ +

Listings do not use page numbers because their content changes so frequently. +Instead, they allow you to view slices of the underlying data. Listing JSON +responses contain after and before fields which are equivalent to the +"next" and "prev" buttons on the site and in combination with count can be +used to page through the listing.

+ +

The common parameters are as follows:

+ +
    +
  • after / before - only one should be specified. these indicate the +fullname of an item in the listing to use as the anchor point of +the slice.
  • +
  • limit - the maximum number of items to return in this slice of the listing.
  • +
  • count - the number of items already seen in this listing. on the html site, +the builder uses this to determine when to give values for before and after +in the response.
  • +
  • show - optional parameter; if all is passed, filters such as "hide links +that I have voted on" will be disabled.
  • +
+ +

To page through a listing, start by fetching the first page without specifying +values for after and count. The response will contain an after value +which you can pass in the next request. It is a good idea, but not required, to +send an updated value for count which should be the number of items already +fetched.

+
+

modhashes

A modhash is a token that the reddit API requires to help prevent +CSRF. Modhashes can be obtained via the +/api/me.json call or in response data of listing endpoints.

+ +

The preferred way to send a modhash is to include an X-Modhash custom HTTP +header with your requests.

+ +

Modhashes are not required when authenticated with OAuth.

+
+

fullnames

A fullname is a combination of a thing's type (e.g. Link) and its unique ID +which forms a compact encoding of a globally unique ID on reddit.

+ +

Fullnames start with the type prefix for the object's type, followed by the +thing's unique ID in base 36. For +example, t3_15bfi0.

+
+
type prefixes
t1_Comment
t2_Account
t3_Link
t4_Message
t5_Subreddit
t6_Award
t8_PromoCampaign

response body encoding

For legacy reasons, all JSON response bodies currently have <, >, and & +replaced with &lt;, &gt;, and &amp;, respectively. If you wish to opt out +of this behaviour, add a raw_json=1 parameter to your request.

+
+

account

GET /api/v1/meidentity

Returns the identity of the user currently authenticated via OAuth.

+
+

GET /api/v1/me/karmamysubreddits

Return a breakdown of subreddit karma.

+
+

GET /api/v1/me/prefsidentity

Return the preference settings of the logged in user

+
+
fields

A comma-separated list of items from this set:

+ +

threaded_messages
+hide_downs
+email_messages
+show_link_flair
+creddit_autorenew
+show_trending
+private_feeds
+monitor_mentions
+research
+ignore_suggested_sort
+media
+clickgadget
+use_global_defaults
+label_nsfw
+domain_details
+show_stylesheets
+highlight_controversial
+no_profanity
+default_theme_sr
+lang
+hide_ups
+hide_from_robots
+compress
+store_visits
+threaded_modmail
+beta
+other_theme
+show_gold_expiration
+over_18
+enable_default_themes
+show_promote
+min_comment_score
+public_votes
+organic
+collapse_read_messages
+show_flair
+mark_messages_read
+hide_ads
+min_link_score
+newwindow
+numsites
+legacy_search
+num_comments
+highlight_new_comments
+default_comment_sort
+hide_locationbar

+

PATCH /api/v1/me/prefsaccount

This endpoint expects JSON data of this format
{
+  "beta": boolean value,
+  "clickgadget": boolean value,
+  "collapse_read_messages": boolean value,
+  "compress": boolean value,
+  "creddit_autorenew": boolean value,
+  "default_comment_sort": one of (`confidence`, `old`, `top`, `qa`, `controversial`, `new`),
+  "domain_details": boolean value,
+  "email_messages": boolean value,
+  "enable_default_themes": boolean value,
+  "hide_ads": boolean value,
+  "hide_downs": boolean value,
+  "hide_from_robots": boolean value,
+  "hide_locationbar": boolean value,
+  "hide_ups": boolean value,
+  "highlight_controversial": boolean value,
+  "highlight_new_comments": boolean value,
+  "ignore_suggested_sort": boolean value,
+  "label_nsfw": boolean value,
+  "lang": a valid IETF language tag (underscore separated),
+  "legacy_search": boolean value,
+  "mark_messages_read": boolean value,
+  "media": one of (`on`, `off`, `subreddit`),
+  "min_comment_score": an integer between -100 and 100,
+  "min_link_score": an integer between -100 and 100,
+  "monitor_mentions": boolean value,
+  "newwindow": boolean value,
+  "no_profanity": boolean value,
+  "num_comments": an integer between 1 and 500,
+  "numsites": an integer between 1 and 100,
+  "organic": boolean value,
+  "other_theme": subreddit name,
+  "over_18": boolean value,
+  "private_feeds": boolean value,
+  "public_votes": boolean value,
+  "research": boolean value,
+  "show_flair": boolean value,
+  "show_gold_expiration": boolean value,
+  "show_link_flair": boolean value,
+  "show_promote": boolean value,
+  "show_stylesheets": boolean value,
+  "show_trending": boolean value,
+  "store_visits": boolean value,
+  "theme_selector": subreddit name,
+  "threaded_messages": boolean value,
+  "threaded_modmail": boolean value,
+  "use_global_defaults": boolean value,
+}
+
+

GET /api/v1/me/trophiesidentity

Return a list of trophies for the current user.

+
+

GET /prefs/wherereadrss support

  • → /prefs/friends
  • → /prefs/blocked
  • → /api/v1/me/friends
  • → /api/v1/me/blocked

This endpoint is a listing.

+
+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+

captcha

GET /api/needs_captchaany

Check whether CAPTCHAs are needed for API methods that define the +"captcha" and "iden" parameters.

+
+

POST /api/new_captchaany

Responds with an iden of a new CAPTCHA.

+ +

Use this endpoint if a user cannot read a given CAPTCHA, +and wishes to receive a new CAPTCHA.

+ +

To request the CAPTCHA image for an iden, use +/captcha/iden.

+
+
api_type

the string json

+

GET /captcha/idenany

Request a CAPTCHA image given an iden.

+ +

An iden is given as the captcha field with a BAD_CAPTCHA +error, you should use this endpoint if you get a +BAD_CAPTCHA error response.

+ +

Responds with a 120x50 image/png which should be displayed +to the user.

+ +

The user's response to the CAPTCHA should be sent as captcha +along with your request.

+ +

To request a new CAPTCHA, +use /api/new_captcha.

+
+

flair

POST [/r/subreddit]/api/clearflairtemplatesmodflair

api_type

the string json

+
flair_type

one of (USER_FLAIR, LINK_FLAIR)

+
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/deleteflairmodflair

api_type

the string json

+
name

a user by name

+
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/deleteflairtemplatemodflair

api_type

the string json

+
flair_template_id
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/flairmodflair

api_type

the string json

+
css_class

a valid subreddit image name

+
link

a fullname of a link

+
name

a user by name

+
text

a string no longer than 64 characters

+
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/flairconfigmodflair

api_type

the string json

+
flair_enabled

boolean value

+
flair_position

one of (left, right)

+
flair_self_assign_enabled

boolean value

+
link_flair_position

one of (`,left,right`)

+
link_flair_self_assign_enabled

boolean value

+
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/flaircsvmodflair

Change the flair of multiple users in the same subreddit with a +single API call.

+ +

Requires a string 'flair_csv' which has up to 100 lines of the form +'user,flairtext,cssclass' (Lines beyond the 100th are ignored).

+ +

If both cssclass and flairtext are the empty string for a given +user, instead clears that user's flair.

+ +

Returns an array of objects indicating if each flair setting was +applied, or a reason for the failure.

+
+
flair_csv

comma-seperated flair information

+
uh / X-Modhash header

a modhash

+

GET [/r/subreddit]/api/flairlistmodflair

This endpoint is a listing.

+
+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 1000)

+
name

a user by name

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+

POST [/r/subreddit]/api/flairselectorflair

Return information about a users's flair options.

+ +

If link is given, return link flair options. +Otherwise, return user flair options for this subreddit.

+ +

The logged in user's flair is also returned. +Subreddit moderators may give a user by name to instead +retrieve that user's flair.

+
+
link

a fullname of a link

+
name

a user by name

+

POST [/r/subreddit]/api/flairtemplatemodflair

api_type

the string json

+
css_class

a valid subreddit image name

+
flair_template_id
flair_type

one of (USER_FLAIR, LINK_FLAIR)

+
text

a string no longer than 64 characters

+
text_editable

boolean value

+
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/selectflairflair

api_type

the string json

+
flair_template_id
link

a fullname of a link

+
name

a user by name

+
text

a string no longer than 64 characters

+
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/setflairenabledflair

api_type

the string json

+
flair_enabled

boolean value

+
uh / X-Modhash header

a modhash

+

reddit gold

POST /api/v1/gold/gild/fullnamecreddits

fullname

fullname of a thing

+

POST /api/v1/gold/give/usernamecreddits

months

an integer between 1 and 36

+
username

A valid, existing reddit username

+

POST /api/commentany

Submit a new comment or reply to a message.

+ +

parent is the fullname of the thing being replied to. Its value +changes the kind of object created by this request:

+ +
    +
  • the fullname of a Link: a top-level comment in that Link's thread. (requires submit scope)
  • +
  • the fullname of a Comment: a comment reply to that comment. (requires submit scope)
  • +
  • the fullname of a Message: a message reply to that message. (requires privatemessages scope)
  • +
+ +

text should be the raw markdown body of the comment or message.

+ +

To start a new message thread, use /api/compose.

+
+
api_type

the string json

+
text

raw markdown text

+
thing_id

fullname of parent thing

+
uh / X-Modhash header

a modhash

+

POST /api/deledit

Delete a Link or Comment.

+
+
id

fullname of a thing created by the user

+
uh / X-Modhash header

a modhash

+

POST /api/editusertextedit

Edit the body text of a comment or self-post.

+
+
api_type

the string json

+
text

raw markdown text

+
thing_id

fullname of a thing created by the user

+
uh / X-Modhash header

a modhash

+

POST /api/hidereport

Hide a link.

+ +

This removes it from the user's default view of subreddit listings.

+ +

See also: /api/unhide.

+
+
id

A comma-separated list of link fullnames

+
uh / X-Modhash header

a modhash

+

GET [/r/subreddit]/api/inforead

Return a listing of things specified by their fullnames.

+ +

Only Links, Comments, and Subreddits are allowed.

+
+
id

A comma-separated list of thing fullnames

+
url

a valid URL

+

POST /api/lockmodposts

Lock a link.

+ +

Prevents a post from receiving new comments.

+ +

See also: /api/unlock.

+
+
id

fullname of a link

+
uh / X-Modhash header

a modhash

+

POST /api/marknsfwmodposts

Mark a link NSFW.

+ +

See also: /api/unmarknsfw.

+
+
id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

GET /api/morechildrenread

Retrieve additional comments omitted from a base comment tree.

+ +

When a comment tree is rendered, the most relevant comments are +selected for display first. Remaining comments are stubbed out with +"MoreComments" links. This API call is used to retrieve the additional +comments represented by those stubs, up to 20 at a time.

+ +

The two core parameters required are link and children. link is +the fullname of the link whose comments are being fetched. children +is a comma-delimited list of comment ID36s that need to be fetched.

+ +

If id is passed, it should be the ID of the MoreComments object this +call is replacing. This is needed only for the HTML UI's purposes and +is optional otherwise.

+ +

NOTE: you may only make one request at a time to this API endpoint. +Higher concurrency will result in an error being returned.

+
+
api_type

the string json

+
children

a comma-delimited list of comment ID36s

+
id

(optional) id of the associated MoreChildren object

+
link_id

fullname of a thing

+
sort

one of (confidence, top, new, controversial, old, random, qa)

+

POST /api/reportreport

Report a link, comment or message.

+ +

Reporting a thing brings it to the attention of the subreddit's +moderators. Reporting a message sends it to a system for admin review.

+ +

For links and comments, the thing is implicitly hidden as well (see +/api/hide for details).

+
+
api_type

the string json

+
other_reason

a string no longer than 100 characters

+
reason

a string no longer than 100 characters

+
site_reason

a string no longer than 100 characters

+
thing_id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

POST /api/savesave

Save a link or comment.

+ +

Saved things are kept in the user's saved listing for later perusal.

+ +

See also: /api/unsave.

+
+
category

a category name

+
id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

GET /api/saved_categoriessave

Get a list of categories in which things are currently saved.

+ +

See also: /api/save.

+
+

POST /api/sendrepliesedit

Enable or disable inbox replies for a link or comment.

+ +

state is a boolean that indicates whether you are enabling or +disabling inbox replies - true to enable, false to disable.

+
+
id

fullname of a thing created by the user

+
state

boolean value

+
uh / X-Modhash header

a modhash

+

POST /api/set_contest_modemodposts

Set or unset "contest mode" for a link's comments.

+ +

state is a boolean that indicates whether you are enabling or +disabling contest mode - true to enable, false to disable.

+
+
api_type

the string json

+
id
state

boolean value

+
uh / X-Modhash header

a modhash

+

POST /api/set_subreddit_stickymodposts

Set or unset a Link as the sticky in its subreddit.

+ +

state is a boolean that indicates whether to sticky or unsticky +this post - true to sticky, false to unsticky.

+ +

The num argument is optional, and only used when stickying a post. +It allows specifying a particular "slot" to sticky the post into, and +if there is already a post stickied in that slot it will be replaced. +If there is no post in the specified slot to replace, or num is None, +the bottom-most slot will be used.

+
+
api_type

the string json

+
id
num

an integer between 1 and 2

+
state

boolean value

+
uh / X-Modhash header

a modhash

+

POST /api/set_suggested_sortmodposts

Set a suggested sort for a link.

+ +

Suggested sorts are useful to display comments in a certain preferred way +for posts. For example, casual conversation may be better sorted by new +by default, or AMAs may be sorted by Q&A. A sort of an empty string +clears the default sort.

+
+
api_type

the string json

+
id
sort

one of (confidence, top, new, controversial, old, random, qa, blank)

+
uh / X-Modhash header

a modhash

+

POST /api/store_visitssave

Requires a subscription to reddit gold

+
+
links

A comma-separated list of link fullnames

+
uh / X-Modhash header

a modhash

+

POST /api/submitsubmit

Submit a link to a subreddit.

+ +

Submit will create a link or self-post in the subreddit sr with the +title title. If kind is "link", then url is expected to be a +valid URL to link to. Otherwise, text, if present, will be the +body of the self-post.

+ +

If a link with the same URL has already been submitted to the specified +subreddit an error will be returned unless resubmit is true. +extension is used for determining which view-type (e.g. json, +compact etc.) to use for the redirect that is generated if the +resubmit error occurs.

+
+
api_type

the string json

+
captcha

the user's response to the CAPTCHA challenge

+
extension

extension used for redirects

+
iden

the identifier of the CAPTCHA challenge

+
kind

one of (link, self)

+
resubmit

boolean value

+
sendreplies

boolean value

+
sr

name of a subreddit

+
text

raw markdown text

+
title

title of the submission. up to 300 characters long

+
uh / X-Modhash header

a modhash

+
url

a valid URL

+

POST /api/unhidereport

Unhide a link.

+ +

See also: /api/hide.

+
+
id

A comma-separated list of link fullnames

+
uh / X-Modhash header

a modhash

+

POST /api/unlockmodposts

Unlock a link.

+ +

Allow a post to receive new comments.

+ +

See also: /api/lock.

+
+
id

fullname of a link

+
uh / X-Modhash header

a modhash

+

POST /api/unmarknsfwmodposts

Remove the NSFW marking from a link.

+ +

See also: /api/marknsfw.

+
+
id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

POST /api/unsavesave

Unsave a link or comment.

+ +

This removes the thing from the user's saved listings as well.

+ +

See also: /api/save.

+
+
id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

POST /api/votevote

Cast a vote on a thing.

+ +

id should be the fullname of the Link or Comment to vote on.

+ +

dir indicates the direction of the vote. Voting 1 is an upvote, +-1 is a downvote, and 0 is equivalent to "un-voting" by clicking +again on a highlighted arrow.

+ +

Note: votes must be cast by humans. That is, API clients proxying a +human's action one-for-one are OK, but bots deciding how to vote on +content or amplifying a human's vote are not. See the reddit +rules for more details on what constitutes vote cheating.

+
+
dir

vote direction. one of (1, 0, -1)

+
id

fullname of a thing

+
rank

an integer greater than 1

+
uh / X-Modhash header

a modhash

+

listings

GET /by_id/namesread

Get a listing of links by fullname.

+ +

names is a list of fullnames for links separated by commas or spaces.

+
+
names

A comma-separated list of link fullnames

+

GET [/r/subreddit]/comments/articlereadrss support

Get the comment tree for a given Link article.

+ +

If supplied, comment is the ID36 of a comment in the comment tree for +article. This comment will be the (highlighted) focal point of the +returned view and context will be the number of parents shown.

+ +

depth is the maximum depth of subtrees in the thread.

+ +

limit is the maximum number of comments to return.

+ +

See also: /api/morechildren and +/api/comment.

+
+
article

ID36 of a link

+
comment

(optional) ID36 of a comment

+
context

an integer between 0 and 8

+
depth

(optional) an integer

+
limit

(optional) an integer

+
showedits

boolean value

+
showmore

boolean value

+
sort

one of (confidence, top, new, controversial, old, random, qa)

+
sr_detail

(optional) expand subreddits

+

GET /duplicates/articlereadrss support

Return a list of other submissions of the same URL

+ +

This endpoint is a listing.

+
+
after

fullname of a thing

+
article

The base 36 ID of a Link

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+

GET [/r/subreddit]/hotreadrss support

This endpoint is a listing.

+
+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+

GET [/r/subreddit]/newreadrss support

This endpoint is a listing.

+
+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+

GET [/r/subreddit]/randomread

The Serendipity button

+
+

GET [/r/subreddit]/sortreadrss support

  • → [/r/subreddit]/top
  • → [/r/subreddit]/controversial

This endpoint is a listing.

+
+
t

one of (hour, day, week, month, year, all)

+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+

live threads

Real-time updates on reddit.

+ +

In addition to the standard reddit API, WebSockets play a huge role in reddit +live. Receiving push notification of changes to the thread via websockets is +much better than polling the thread repeatedly.

+ +

To connect to the websocket server, fetch +/live/thread/about.json and get the +websocket_url field. The websocket URL expires after a period of time; if it +does, fetch a new one from that endpoint.

+ +

Once connected to the socket, a variety of messages can come in. All messages +will be in text frames containing a JSON object with two keys: type and +payload. Live threads can send messages with many types:

+ +
    +
  • update - a new update has been posted in the thread. the payload contains +the JSON representation of the update.
  • +
  • activity - periodic update of the viewer counts for the thread.
  • +
  • settings - the thread's settings have changed. the payload is an object +with each key being a property of the thread (as in about.json) and its new +value.
  • +
  • delete - an update has been deleted (removed from the thread). +the payload is the ID of the deleted update.
  • +
  • strike - an update has been stricken (marked incorrect and crossed out). +the payload is the ID of the stricken update.
  • +
  • embeds_ready - a previously posted update has been parsed and embedded +media is available for it now. the payload contains a liveupdate_id and +list of embeds to add to it.
  • +
  • complete - the thread has been marked complete. no further updates will +be sent.
  • +
+ +

See /r/live for more information.

+
+

POST /api/live/createsubmit

Create a new live thread.

+ +

Once created, the initial settings can be modified with +/api/live/thread/edit and new updates +can be posted with +/api/live/thread/update.

+
+
api_type

the string json

+
description

raw markdown text

+
nsfw

boolean value

+
resources

raw markdown text

+
title

a string no longer than 120 characters

+
uh / X-Modhash header

a modhash

+

POST /api/live/thread/accept_contributor_invitelivemanage

Accept a pending invitation to contribute to the thread.

+ +

See also: /api/live/thread/leave_contributor.

+
+
api_type

the string json

+
uh / X-Modhash header

a modhash

+

POST /api/live/thread/close_threadlivemanage

Permanently close the thread, disallowing future updates.

+ +

Requires the close permission for this thread.

+
+
api_type

the string json

+
uh / X-Modhash header

a modhash

+

POST /api/live/thread/delete_updateedit

Delete an update from the thread.

+ +

Requires that specified update must have been authored by the user or +that you have the edit permission for this thread.

+ +

See also: /api/live/thread/update.

+
+
api_type

the string json

+
id

the ID of a single update. e.g. LiveUpdate_ff87068e-a126-11e3-9f93-12313b0b3603

+
uh / X-Modhash header

a modhash

+

POST /api/live/thread/editlivemanage

Configure the thread.

+ +

Requires the settings permission for this thread.

+ +

See also: /live/thread/about.json.

+
+
api_type

the string json

+
description

raw markdown text

+
nsfw

boolean value

+
resources

raw markdown text

+
title

a string no longer than 120 characters

+
uh / X-Modhash header

a modhash

+

POST /api/live/thread/invite_contributorlivemanage

Invite another user to contribute to the thread.

+ +

Requires the manage permission for this thread. If the recipient +accepts the invite, they will be granted the permissions specified.

+ +

See also: /api/live/thread/accept_contributor_invite, and +/api/live/thread/rm_contributor_invite.

+
+
api_type

the string json

+
name

the name of an existing user

+
permissions

permission description e.g. +update,+edit,-manage

+
type

one of (liveupdate_contributor_invite, liveupdate_contributor)

+
uh / X-Modhash header

a modhash

+

POST /api/live/thread/leave_contributorlivemanage

Abdicate contributorship of the thread.

+ +

See also: /api/live/thread/accept_contributor_invite, and +/api/live/thread/invite_contributor.

+
+
api_type

the string json

+
uh / X-Modhash header

a modhash

+

POST /api/live/thread/reportreport

Report the thread for violating the rules of reddit.

+
+
api_type

the string json

+
type

one of (spam, vote-manipulation, personal-information, sexualizing-minors, site-breaking)

+
uh / X-Modhash header

a modhash

+

POST /api/live/thread/rm_contributorlivemanage

Revoke another user's contributorship.

+ +

Requires the manage permission for this thread.

+ +

See also: /api/live/thread/invite_contributor.

+
+
api_type

the string json

+
id

fullname of a account

+
uh / X-Modhash header

a modhash

+

POST /api/live/thread/rm_contributor_invitelivemanage

Revoke an outstanding contributor invite.

+ +

Requires the manage permission for this thread.

+ +

See also: /api/live/thread/invite_contributor.

+
+
api_type

the string json

+
id

fullname of a account

+
uh / X-Modhash header

a modhash

+

POST /api/live/thread/set_contributor_permissionslivemanage

Change a contributor or contributor invite's permissions.

+ +

Requires the manage permission for this thread.

+ +

See also: /api/live/thread/invite_contributor and +/api/live/thread/rm_contributor.

+
+
api_type

the string json

+
name

the name of an existing user

+
permissions

permission description e.g. +update,+edit,-manage

+
type

one of (liveupdate_contributor_invite, liveupdate_contributor)

+
uh / X-Modhash header

a modhash

+

POST /api/live/thread/strike_updateedit

Strike (mark incorrect and cross out) the content of an update.

+ +

Requires that specified update must have been authored by the user or +that you have the edit permission for this thread.

+ +

See also: /api/live/thread/update.

+
+
api_type

the string json

+
id

the ID of a single update. e.g. LiveUpdate_ff87068e-a126-11e3-9f93-12313b0b3603

+
uh / X-Modhash header

a modhash

+

POST /api/live/thread/updatesubmit

Post an update to the thread.

+ +

Requires the update permission for this thread.

+ +

See also: /api/live/thread/strike_update, and +/api/live/thread/delete_update.

+
+
api_type

the string json

+
body

raw markdown text

+
uh / X-Modhash header

a modhash

+

GET /live/threadreadrss support

Get a list of updates posted in this thread.

+ +

See also: /api/live/thread/update.

+ +

This endpoint is a listing.

+
+
after

the ID of a single update. e.g. LiveUpdate_ff87068e-a126-11e3-9f93-12313b0b3603

+
before

the ID of a single update. e.g. LiveUpdate_ff87068e-a126-11e3-9f93-12313b0b3603

+
count

a positive integer (default: 0)

+
is_embed

(internal use only)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
stylesr

subreddit name

+

GET /live/thread/aboutread

Get some basic information about the live thread.

+ +

See also: /api/live/thread/edit.

+
+

GET /live/thread/contributorsread

Get a list of users that contribute to this thread.

+ +

See also: /api/live/thread/invite_contributor, and +/api/live/thread/rm_contributor.

+
+

GET /live/thread/discussionsreadrss support

Get a list of reddit submissions linking to this thread.

+ +

This endpoint is a listing.

+
+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+

private messages

POST /api/blockprivatemessages

For blocking via inbox.

+
+
id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

POST /api/collapse_message

Collapse a message

+ +

See also: /api/uncollapse_message

+
+
id

A comma-separated list of thing fullnames

+
uh / X-Modhash header

a modhash

+

POST /api/composeprivatemessages

Handles message composition under /message/compose.

+
+
api_type

the string json

+
captcha

the user's response to the CAPTCHA challenge

+
from_sr

subreddit name

+
iden

the identifier of the CAPTCHA challenge

+
subject

a string no longer than 100 characters

+
text

raw markdown text

+
to

the name of an existing user

+
uh / X-Modhash header

a modhash

+

POST /api/read_all_messagesprivatemessages

Queue up marking all messages for a user as read.

+ +

This may take some time, and returns 202 to acknowledge acceptance of +the request.

+
+
uh / X-Modhash header

a modhash

+

POST /api/read_messageprivatemessages

id

A comma-separated list of thing fullnames

+
uh / X-Modhash header

a modhash

+

POST /api/unblock_subredditprivatemessages

id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

POST /api/uncollapse_message

Uncollapse a message

+ +

See also: /api/collapse_message

+
+
id

A comma-separated list of thing fullnames

+
uh / X-Modhash header

a modhash

+

POST /api/unread_messageprivatemessages

id

A comma-separated list of thing fullnames

+
uh / X-Modhash header

a modhash

+

GET /message/whereprivatemessagesrss support

  • → /message/inbox
  • → /message/unread
  • → /message/sent

This endpoint is a listing.

+
+
mark

one of (true, false)

+
mid
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+

misc

GET /api/v1/scopesany

Retrieve descriptions of reddit's OAuth2 scopes.

+ +

If no scopes are given, information on all scopes are returned.

+ +

Invalid scope(s) will result in a 400 error with body that indicates +the invalid scope(s).

+
+
scopes

(optional) An OAuth2 scope string

+

moderation

GET [/r/subreddit]/about/logmodlogrss support

Get a list of recent moderation actions.

+ +

Moderator actions taken within a subreddit are logged. This listing is +a view of that log with various filters to aid in analyzing the +information.

+ +

The optional mod parameter can be a comma-delimited list of moderator +names to restrict the results to, or the string a to restrict the +results to admin actions taken within the subreddit.

+ +

The type parameter is optional and if sent limits the log entries +returned to only those of the type specified.

+ +

This endpoint is a listing.

+
+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 500)

+
mod

(optional) a moderator filter

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+
type

one of (banuser, unbanuser, removelink, approvelink, removecomment, approvecomment, addmoderator, invitemoderator, uninvitemoderator, acceptmoderatorinvite, removemoderator, addcontributor, removecontributor, editsettings, editflair, distinguish, marknsfw, wikibanned, wikicontributor, wikiunbanned, wikipagelisted, removewikicontributor, wikirevise, wikipermlevel, ignorereports, unignorereports, setpermissions, setsuggestedsort, sticky, unsticky, setcontestmode, unsetcontestmode, lock, unlock, muteuser, unmuteuser, createrule, editrule, deleterule)

+

GET [/r/subreddit]/about/locationread

  • → [/r/subreddit]/about/reports
  • → [/r/subreddit]/about/spam
  • → [/r/subreddit]/about/modqueue
  • → [/r/subreddit]/about/unmoderated
  • → [/r/subreddit]/about/edited

Return a listing of posts relevant to moderators.

+ +
    +
  • reports: Things that have been reported.
  • +
  • spam: Things that have been marked as spam or otherwise removed.
  • +
  • modqueue: Things requiring moderator review, such as reported things +and items caught by the spam filter.
  • +
  • unmoderated: Things that have yet to be approved/removed by a mod.
  • +
  • edited: Things that have been edited recently.
  • +
+ +

Requires the "posts" moderator permission for the subreddit.

+ +

This endpoint is a listing.

+
+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
location
only

one of (links, comments)

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+

POST [/r/subreddit]/api/accept_moderator_invitemodself

Accept an invite to moderate the specified subreddit.

+ +

The authenticated user must have been invited to moderate the subreddit +by one of its current moderators.

+ +

See also: /api/friend and +/subreddits/mine.

+
+
api_type

the string json

+
uh / X-Modhash header

a modhash

+

POST /api/approvemodposts

Approve a link or comment.

+ +

If the thing was removed, it will be re-inserted into appropriate +listings. Any reports on the approved thing will be discarded.

+ +

See also: /api/remove.

+
+
id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

POST /api/distinguishmodposts

Distinguish a thing's author with a sigil.

+ +

This can be useful to draw attention to and confirm the identity of the +user in the context of a link or comment of theirs. The options for +distinguish are as follows:

+ +
    +
  • yes - add a moderator distinguish ([M]). only if the user is a + moderator of the subreddit the thing is in.
  • +
  • no - remove any distinguishes.
  • +
  • admin - add an admin distinguish ([A]). admin accounts only.
  • +
  • special - add a user-specific distinguish. depends on user.
  • +
+ +

The first time a top-level comment is moderator distinguished, the +author of the link the comment is in reply to will get a notification +in their inbox.

+
+
api_type

the string json

+
how

one of (yes, no, admin, special)

+
id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

POST /api/ignore_reportsmodposts

Prevent future reports on a thing from causing notifications.

+ +

Any reports made about a thing after this flag is set on it will not +cause notifications or make the thing show up in the various moderation +listings.

+ +

See also: /api/unignore_reports.

+
+
id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

POST /api/leavecontributormodself

Abdicate approved submitter status in a subreddit.

+ +

See also: /api/friend.

+
+
id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

POST /api/leavemoderatormodself

Abdicate moderator status in a subreddit.

+ +

See also: /api/friend.

+
+
id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

POST /api/mute_message_authormodcontributors

For muting user via modmail.

+
+
id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

POST /api/removemodposts

Remove a link, comment, or modmail message.

+ +

If the thing is a link, it will be removed from all subreddit listings. +If the thing is a comment, it will be redacted and removed from all +subreddit comment listings.

+ +

See also: /api/approve.

+
+
id

fullname of a thing

+
spam

boolean value

+
uh / X-Modhash header

a modhash

+

POST /api/unignore_reportsmodposts

Allow future reports on a thing to cause notifications.

+ +

See also: /api/ignore_reports.

+
+
id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

POST /api/unmute_message_authormodcontributors

For unmuting user via modmail.

+
+
id

fullname of a thing

+
uh / X-Modhash header

a modhash

+

GET [/r/subreddit]/stylesheetmodconfig

Redirect to the subreddit's stylesheet if one exists.

+ +

See also: /api/subreddit_stylesheet.

+
+

multis

POST /api/multi/copysubscribe

Copy a multi.

+ +

Responds with 409 Conflict if the target already exists.

+ +

A "copied from ..." line will automatically be appended to the +description.

+
+
display_name

a string no longer than 50 characters

+
from

multireddit url path

+
to

destination multireddit url path

+
uh / X-Modhash header

a modhash

+

GET /api/multi/mineread

Fetch a list of multis belonging to the current user.

+
+
expand_srs

boolean value

+

POST /api/multi/renamesubscribe

Rename a multi.

+
+
display_name

a string no longer than 50 characters

+
from

multireddit url path

+
to

destination multireddit url path

+
uh / X-Modhash header

a modhash

+

GET /api/multi/user/usernameread

Fetch a list of public multis belonging to username

+
+
expand_srs

boolean value

+
username

A valid, existing reddit username

+

DELETE /api/multi/multipathsubscribe

  • → /api/filter/filterpath

Delete a multi.

+
+
multipath

multireddit url path

+
uh / X-Modhash header

a modhash

+
expand_srs

boolean value

+

GET /api/multi/multipathread

  • → /api/filter/filterpath

Fetch a multi's data and subreddit list by name.

+
+
expand_srs

boolean value

+
multipath

multireddit url path

+

POST /api/multi/multipathsubscribe

  • → /api/filter/filterpath

Create a multi. Responds with 409 Conflict if it already exists.

+
+
model

json data:

+ +
{
+  "description_md": raw markdown text,
+  "display_name": a string no longer than 50 characters,
+  "icon_name": one of (`art and design`, `ask`, `books`, `business`, `cars`, `comics`, `cute animals`, `diy`, `entertainment`, `food and drink`, `funny`, `games`, `grooming`, `health`, `life advice`, `military`, `models pinup`, `music`, `news`, `philosophy`, `pictures and gifs`, `science`, `shopping`, `sports`, `style`, `tech`, `travel`, `unusual stories`, `video`, ``, `None`),
+  "key_color": a 6-digit rgb hex color, e.g. `#AABBCC`,
+  "subreddits": [
+    {
+      "name": subreddit name,
+    },
+    ...
+  ],
+  "visibility": one of (`private`, `public`, `hidden`),
+  "weighting_scheme": one of (`classic`, `fresh`),
+}
+
+
multipath

multireddit url path

+
uh / X-Modhash header

a modhash

+
expand_srs

boolean value

+

PUT /api/multi/multipathsubscribe

  • → /api/filter/filterpath

Create or update a multi.

+
+
model

json data:

+ +
{
+  "description_md": raw markdown text,
+  "display_name": a string no longer than 50 characters,
+  "icon_name": one of (`art and design`, `ask`, `books`, `business`, `cars`, `comics`, `cute animals`, `diy`, `entertainment`, `food and drink`, `funny`, `games`, `grooming`, `health`, `life advice`, `military`, `models pinup`, `music`, `news`, `philosophy`, `pictures and gifs`, `science`, `shopping`, `sports`, `style`, `tech`, `travel`, `unusual stories`, `video`, ``, `None`),
+  "key_color": a 6-digit rgb hex color, e.g. `#AABBCC`,
+  "subreddits": [
+    {
+      "name": subreddit name,
+    },
+    ...
+  ],
+  "visibility": one of (`private`, `public`, `hidden`),
+  "weighting_scheme": one of (`classic`, `fresh`),
+}
+
+
multipath

multireddit url path

+
uh / X-Modhash header

a modhash

+
expand_srs

boolean value

+

GET /api/multi/multipath/descriptionread

Get a multi's description.

+
+
multipath

multireddit url path

+

PUT /api/multi/multipath/descriptionread

Change a multi's markdown description.

+
+
model

json data:

+ +
{
+  "body_md": raw markdown text,
+}
+
+
multipath

multireddit url path

+
uh / X-Modhash header

a modhash

+

DELETE /api/multi/multipath/r/srnamesubscribe

  • → /api/filter/filterpath/r/srname

Remove a subreddit from a multi.

+
+
multipath

multireddit url path

+
srname

subreddit name

+
uh / X-Modhash header

a modhash

+

GET /api/multi/multipath/r/srnameread

  • → /api/filter/filterpath/r/srname

Get data about a subreddit in a multi.

+
+
multipath

multireddit url path

+
srname

subreddit name

+

PUT /api/multi/multipath/r/srnamesubscribe

  • → /api/filter/filterpath/r/srname

Add a subreddit to a multi.

+
+
model

json data:

+ +
{
+  "name": subreddit name,
+}
+
+
multipath

multireddit url path

+
srname

subreddit name

+
uh / X-Modhash header

a modhash

+

subreddits

GET [/r/subreddit]/about/wherereadrss support

  • → [/r/subreddit]/about/banned
  • → [/r/subreddit]/about/muted
  • → [/r/subreddit]/about/wikibanned
  • → [/r/subreddit]/about/contributors
  • → [/r/subreddit]/about/wikicontributors
  • → [/r/subreddit]/about/moderators

This endpoint is a listing.

+
+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+
user

A valid, existing reddit username

+

POST [/r/subreddit]/api/delete_sr_bannermodconfig

Remove the subreddit's custom mobile banner.

+ +

See also: /api/upload_sr_img.

+
+
api_type

the string json

+
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/delete_sr_headermodconfig

Remove the subreddit's custom header image.

+ +

The sitewide-default header image will be shown again after this call.

+ +

See also: /api/upload_sr_img.

+
+
api_type

the string json

+
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/delete_sr_iconmodconfig

Remove the subreddit's custom mobile icon.

+ +

See also: /api/upload_sr_img.

+
+
api_type

the string json

+
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/delete_sr_imgmodconfig

Remove an image from the subreddit's custom image set.

+ +

The image will no longer count against the subreddit's image limit. +However, the actual image data may still be accessible for an +unspecified amount of time. If the image is currently referenced by the +subreddit's stylesheet, that stylesheet will no longer validate and +won't be editable until the image reference is removed.

+ +

See also: /api/upload_sr_img.

+
+
api_type

the string json

+
img_name

a valid subreddit image name

+
uh / X-Modhash header

a modhash

+

GET /api/recommend/sr/srnamesread

Return subreddits recommended for the given subreddit(s).

+ +

Gets a list of subreddits recommended for srnames, filtering out any +that appear in the optional omit param.

+
+
omit

comma-delimited list of subreddit names

+
srnames

comma-delimited list of subreddit names

+

POST /api/search_reddit_namesread

List subreddit names that begin with a query string.

+ +

Subreddits whose names begin with query will be returned. If +include_over_18 is false, subreddits with over-18 content +restrictions will be filtered from the results.

+ +

If exact is true, only an exact match will be returned.

+
+
exact

boolean value

+
include_over_18

boolean value

+
query

a string up to 50 characters long, consisting of printable characters.

+

POST /api/site_adminmodconfig

Create or configure a subreddit.

+ +

If sr is specified, the request will attempt to modify the specified +subreddit. If not, a subreddit with name name will be created.

+ +

This endpoint expects all values to be supplied on every request. If +modifying a subset of options, it may be useful to get the current +settings from /about/edit.json +first.

+ +

For backwards compatibility, description is the sidebar text and +public_description is the publicly visible subreddit description.

+ +

Most of the parameters for this endpoint are identical to options +visible in the user interface and their meanings are best explained +there.

+ +

See also: /about/edit.json.

+
+
allow_top

boolean value

+
api_type

the string json

+
captcha

the user's response to the CAPTCHA challenge

+
collapse_deleted_comments

boolean value

+
comment_score_hide_mins

an integer between 0 and 1440 (default: 0)

+
description

raw markdown text

+
exclude_banned_modqueue

boolean value

+
header-title

a string no longer than 500 characters

+
hide_ads

boolean value

+
iden

the identifier of the CAPTCHA challenge

+
lang

a valid IETF language tag (underscore separated)

+
link_type

one of (any, link, self)

+
name

subreddit name

+
over_18

boolean value

+
public_description

raw markdown text

+
public_traffic

boolean value

+
show_media

boolean value

+
spam_comments

one of (low, high, all)

+
spam_links

one of (low, high, all)

+
spam_selfposts

one of (low, high, all)

+
sr

fullname of a thing

+
submit_link_label

a string no longer than 60 characters

+
submit_text

raw markdown text

+
submit_text_label

a string no longer than 60 characters

+
suggested_comment_sort

one of (confidence, top, new, controversial, old, random, qa)

+
title

a string no longer than 100 characters

+
type

one of (gold_restricted, archived, restricted, gold_only, employees_only, private, public)

+
uh / X-Modhash header

a modhash

+
wiki_edit_age

an integer greater than 0 (default: 0)

+
wiki_edit_karma

an integer greater than 0 (default: 0)

+
wikimode

one of (disabled, modonly, anyone)

+

GET [/r/subreddit]/api/submit_textsubmit

Get the submission text for the subreddit.

+ +

This text is set by the subreddit moderators and intended to be +displayed on the submission form.

+ +

See also: /api/site_admin.

+
+

POST [/r/subreddit]/api/subreddit_stylesheetmodconfig

Update a subreddit's stylesheet.

+ +

op should be save to update the contents of the stylesheet.

+
+
api_type

the string json

+
op

one of (save, preview)

+
reason

a string up to 256 characters long, consisting of printable characters.

+
stylesheet_contents

the new stylesheet content

+
uh / X-Modhash header

a modhash

+

GET /api/subreddits_by_topicread

Return a list of subreddits that are relevant to a search query.

+
+
query

a string no longer than 50 characters

+

POST /api/subscribesubscribe

Subscribe to or unsubscribe from a subreddit.

+ +

To subscribe, action should be sub. To unsubscribe, action should +be unsub. The user must have access to the subreddit to be able to +subscribe to it.

+ +

See also: /subreddits/mine/.

+
+
action

one of (sub, unsub)

+
sr

the name of a subreddit

+
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/upload_sr_imgmodconfig

Add or replace a subreddit image, custom header logo, custom mobile +icon, or custom mobile banner.

+ +
    +
  • If the upload_type value is img, an image for use in the +subreddit stylesheet is uploaded with the name specified in name.
  • +
  • If the upload_type value is header then the image uploaded will +be the subreddit's new logo and name will be ignored.
  • +
  • If the upload_type value is icon then the image uploaded will be +the subreddit's new mobile icon and name will be ignored.
  • +
  • If the upload_type value is banner then the image uploaded will +be the subreddit's new mobile banner and name will be ignored.
  • +
+ +

For backwards compatibility, if upload_type is not specified, the +header field will be used instead:

+ +
    +
  • If the header field has value 0, then upload_type is img.
  • +
  • If the header field has value 1, then upload_type is header.
  • +
+ +

The img_type field specifies whether to store the uploaded image as a +PNG or JPEG.

+ +

Subreddits have a limited number of images that can be in use at any +given time. If no image with the specified name already exists, one of +the slots will be consumed.

+ +

If an image with the specified name already exists, it will be +replaced. This does not affect the stylesheet immediately, but will +take effect the next time the stylesheet is saved.

+ +

See also: /api/delete_sr_img, +/api/delete_sr_header, +/api/delete_sr_icon, and +/api/delete_sr_banner.

+
+
file

file upload with maximum size of 500 KiB

+
formid

(optional) can be ignored

+
header

an integer between 0 and 1

+
img_type

one of png or jpg (default: png)

+
name

a valid subreddit image name

+
uh / X-Modhash header

a modhash

+
upload_type

one of (img, header, icon, banner)

+

GET /r/subreddit/aboutread

Return information about the subreddit.

+ +

Data includes the subscriber count, description, and header image.

+
+

GET /r/subreddit/about/editmodconfig

Get the current settings of a subreddit.

+ +

In the API, this returns the current settings of the subreddit as used +by /api/site_admin. On the HTML site, it will +display a form for editing the subreddit.

+
+
created

one of (true, false)

+
location

GET [/r/subreddit]/rulesread

Get the rules for the current subreddit

+
+

GET [/r/subreddit]/sidebarread

Get the sidebar for the current subreddit

+
+

GET [/r/subreddit]/stickyread

Redirect to one of the posts stickied in the current subreddit

+ +

The "num" argument can be used to select a specific sticky, and will +default to 1 (the top sticky) if not specified. +Will 404 if there is not currently a sticky post in this subreddit.

+
+
num

an integer between 1 and 2 (default: 1)

+

GET /subreddits/mine/wheremysubredditsrss support

  • → /subreddits/mine/subscriber
  • → /subreddits/mine/contributor
  • → /subreddits/mine/moderator

Get subreddits the user has a relationship with.

+ +

The where parameter chooses which subreddits are returned as follows:

+ +
    +
  • subscriber - subreddits the user is subscribed to
  • +
  • contributor - subreddits the user is an approved submitter in
  • +
  • moderator - subreddits the user is a moderator of
  • +
+ +

See also: /api/subscribe, +/api/friend, and +/api/accept_moderator_invite.

+ +

This endpoint is a listing.

+
+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+

GET /subreddits/wherereadrss support

  • → /subreddits/new
  • → /subreddits/gold
  • → /subreddits/default

Get all subreddits.

+ +

The where parameter chooses the order in which the subreddits are +displayed. popular sorts on the activity of the subreddit and the +position of the subreddits can shift around. new sorts the subreddits +based on their creation date, newest first.

+ +

This endpoint is a listing.

+
+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+

users

POST [/r/subreddit]/api/friendany

Create a relationship between a user and another user or subreddit

+ +

OAuth2 use requires appropriate scope based +on the 'type' of the relationship:

+ +
    +
  • moderator: Use "moderator_invite"
  • +
  • moderator_invite: modothers
  • +
  • contributor: modcontributors
  • +
  • banned: modcontributors
  • +
  • muted: modcontributors
  • +
  • wikibanned: modcontributors and modwiki
  • +
  • wikicontributor: modcontributors and modwiki
  • +
  • friend: Use /api/v1/me/friends/{username}
  • +
  • enemy: Use /api/block
  • +
+ +

Complement to POST_unfriend

+
+
api_type

the string json

+
ban_message

raw markdown text

+
ban_reason

a string no longer than 100 characters

+
container
duration

an integer between 1 and 999

+
name

the name of an existing user

+
note

a string no longer than 300 characters

+
permissions
type

one of (friend, moderator, moderator_invite, contributor, banned, muted, wikibanned, wikicontributor)

+
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/setpermissionsmodothers

api_type

the string json

+
name

the name of an existing user

+
permissions
type
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/unfriendany

Remove a relationship between a user and another user or subreddit

+ +

The user can either be passed in by name (nuser) +or by fullname (iuser). If type is friend or enemy, +'container' MUST be the current user's fullname; +for other types, the subreddit must be set +via URL (e.g., /r/funny/api/unfriend)

+ +

OAuth2 use requires appropriate scope based +on the 'type' of the relationship:

+ +
    +
  • moderator: modothers
  • +
  • moderator_invite: modothers
  • +
  • contributor: modcontributors
  • +
  • banned: modcontributors
  • +
  • muted: modcontributors
  • +
  • wikibanned: modcontributors and modwiki
  • +
  • wikicontributor: modcontributors and modwiki
  • +
  • friend: Use /api/v1/me/friends/{username}
  • +
  • enemy: privatemessages
  • +
+ +

Complement to POST_friend

+
+
container
id

fullname of a thing

+
name

the name of an existing user

+
type

one of (friend, enemy, moderator, moderator_invite, contributor, banned, muted, wikibanned, wikicontributor)

+
uh / X-Modhash header

a modhash

+

GET /api/username_available

Check whether a username is available for registration.

+
+
user

a valid, unused, username

+

DELETE /api/v1/me/friends/usernamesubscribe

Stop being friends with a user.

+
+
id

A valid, existing reddit username

+

GET /api/v1/me/friends/usernamemysubreddits

Get information about a specific 'friend', such as notes.

+
+
id

A valid, existing reddit username

+

PUT /api/v1/me/friends/usernamesubscribe

Create or update a "friend" relationship.

+ +

This operation is idempotent. It can be used to add a new +friend, or update an existing friend (e.g., add/change the +note on that friend)

+
+
This endpoint expects JSON data of this format
{
+  "name": A valid, existing reddit username,
+  "note": a string no longer than 300 characters,
+}
+
+

GET /api/v1/user/username/trophiesread

Return a list of trophies for the a given user.

+
+
id

A valid, existing reddit username

+

GET /user/username/aboutread

Return information about the user, including karma and gold status.

+
+
username

the name of an existing user

+

GET /user/username/wherehistoryrss support

  • → /user/username/overview
  • → /user/username/submitted
  • → /user/username/comments
  • → /user/username/upvoted
  • → /user/username/downvoted
  • → /user/username/hidden
  • → /user/username/saved
  • → /user/username/gilded

This endpoint is a listing.

+
+
show

one of (given)

+
sort

one of (hot, new, top, controversial)

+
t

one of (hour, day, week, month, year, all)

+
username

the name of an existing user

+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
sr_detail

(optional) expand subreddits

+

wiki

POST [/r/subreddit]/api/wiki/alloweditor/actmodwiki

  • → [/r/subreddit]/api/wiki/alloweditor/del
  • → [/r/subreddit]/api/wiki/alloweditor/add

Allow/deny username to edit this wiki page

+
+
act

one of (del, add)

+
page

the name of an existing wiki page

+
uh / X-Modhash header

a modhash

+
username

the name of an existing user

+

POST [/r/subreddit]/api/wiki/editwikiedit

Edit a wiki page

+
+
content
page

the name of an existing page or a new page to create

+
previous

the starting point revision for this edit

+
reason

a string up to 256 characters long, consisting of printable characters.

+
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/wiki/hidemodwiki

Toggle the public visibility of a wiki page revision

+
+
page

the name of an existing wiki page

+
revision

a wiki revision ID

+
uh / X-Modhash header

a modhash

+

POST [/r/subreddit]/api/wiki/revertmodwiki

Revert a wiki page to revision

+
+
page

the name of an existing wiki page

+
revision

a wiki revision ID

+
uh / X-Modhash header

a modhash

+

GET [/r/subreddit]/wiki/discussions/pagewikiread

Retrieve a list of discussions about this wiki page

+ +

This endpoint is a listing.

+
+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
page

the name of an existing wiki page

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+

GET [/r/subreddit]/wiki/pageswikiread

Retrieve a list of wiki pages in this subreddit

+
+

GET [/r/subreddit]/wiki/revisionswikiread

Retrieve a list of recently changed wiki pages in this subreddit

+
+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+

GET [/r/subreddit]/wiki/revisions/pagewikiread

Retrieve a list of revisions of this wiki page

+ +

This endpoint is a listing.

+
+
after

fullname of a thing

+
before

fullname of a thing

+
count

a positive integer (default: 0)

+
limit

the maximum number of items desired (default: 25, maximum: 100)

+
page

the name of an existing wiki page

+
show

(optional) the string all

+
sr_detail

(optional) expand subreddits

+

GET [/r/subreddit]/wiki/settings/pagemodwiki

Retrieve the current permission settings for page

+
+
page

the name of an existing wiki page

+

POST [/r/subreddit]/wiki/settings/pagemodwiki

Update the permissions and visibility of wiki page

+
+
listed

boolean value

+
page

the name of an existing wiki page

+
permlevel

an integer

+
uh / X-Modhash header

a modhash

+

GET [/r/subreddit]/wiki/pagewikiread

Return the content of a wiki page

+ +

If v is given, show the wiki page as it was at that version +If both v and v2 are given, show a diff of the two

+
+
page

the name of an existing wiki page

+
v

a wiki revision ID

+
v2

a wiki revision ID

+