RedditapisRedditapis
Listings & Search

Check Whether You Can Post in a Subreddit

Before posting, check whether a post in a subreddit can go through: allowed true, false or unknown, a reason code per block, the posting requirements and the post rules.

GET/api/reddit/sub/:name/can-post$0.0015 / call

Check before you post whether a post in this subreddit can go through, so an agent or app does not spend a post that gets removed. Returns allowed, a list of reasons with a stable code each, the subreddit's posting requirements and the rules that apply to posts.

Send your Reddit session in the x-reddit-session and x-reddit-loid headers (see authenticated reads) to also check your own account: whether it is banned or approved here, its karma, its age and whether its email is verified. Without them the answer covers the subreddit only.

When to use this

Call it right before a submit or a comment to catch the blocks Reddit tells us about: a ban, a private or restricted subreddit, an archived one, a link-only or text-only subreddit, a required flair, title and body rules, and blocked domains. One read.

What allowed means

ValueMeaning
trueEvery read succeeded and nothing in them blocks the post.
falseSomething we read blocks it, such as a ban or a restricted subreddit your account is not approved in.
"unknown"Nothing we read blocks it, but a read we needed failed, or the answer depends on your account and no session was sent.

true still cannot see AutoModerator. Subreddits do not publish their karma, age or email thresholds, so karma and account age only ever add a *_hint reason, never a false.

Path Parameters

ParameterTypeRequiredDescription
namestringYesSubreddit name (no r/ prefix)

A subreddit that does not exist returns 404.

Example

curl -H "Authorization: Bearer $TOKEN" \
  -H "x-reddit-session: $REDDIT_SESSION" -H "x-reddit-loid: $REDDIT_LOID" \
  "https://api.redditapis.com/api/reddit/sub/AskReddit/can-post"
const response = await fetch(
  "https://api.redditapis.com/api/reddit/sub/AskReddit/can-post",
  { headers: { Authorization: "Bearer TOKEN", "x-reddit-session": SESSION, "x-reddit-loid": LOID } }
);
const data = await response.json();
import requests

response = requests.get(
    "https://api.redditapis.com/api/reddit/sub/AskReddit/can-post",
    headers={"Authorization": "Bearer TOKEN", "x-reddit-session": SESSION, "x-reddit-loid": LOID},
)

Response Shape

{
  "subreddit": "AskReddit",
  "allowed": true,
  "reasons": [
    { "code": "submission_type", "detail": "Only text posts are allowed (no links)." },
    { "code": "low_karma_hint", "detail": "The account has 12 karma. Many subreddits filter low-karma posts, with thresholds they do not publish. A hint, not a verdict." }
  ],
  "requirements": {
    "flair_required": false,
    "title": { "min_length": null, "max_length": 300, "regexes": [], "required_strings": [], "blacklisted_strings": [] },
    "body": { "policy": "notAllowed", "min_length": null, "max_length": null, "required_strings": [], "blacklisted_strings": [] },
    "domains": { "blocked": [], "allowed_only": [] },
    "rules": [{ "name": "Rule 1: Questions only", "description": "Posts must be a question.", "violation_reason": "Not a question" }]
  },
  "account": {
    "name": "your_account",
    "karma": 12,
    "account_age_days": 9,
    "email_verified": true,
    "is_banned_here": false,
    "is_approved_user": false,
    "is_moderator": false
  },
  "scope": "subreddit_and_account"
}

Reason codes

CodeBlocks?Meaning
bannedYesYour account is banned from this subreddit (needs your session).
privateYes, unless approvedReddit refuses the subreddit to anyone not approved. With your session the answer is false; without one it is "unknown", because approval is per account. requirements is null here: a closed subreddit shows its requirements only to members.
restricted_approved_onlyYes, unless approvedOnly approved users can post.
archivedYesNobody can post.
submission_typeNoOnly link posts, or only text posts, are allowed.
flair_requiredNoA post flair is required.
title_ruleNoTitle length, required or banned words, or patterns.
body_ruleNoA body is required, or not allowed, or has length or word rules.
domain_blockedNoLinks to some domains are blocked, or only some are allowed.
email_unverifiedNoA hint: many filters remove posts from unverified accounts.
low_karma_hintNoA hint: low karma, threshold unknown.
new_account_hintNoA hint: a new account, threshold unknown.

account is null and scope is subreddit when no session is sent. If the session is sent but Reddit treats it as logged out, the account cannot be read, so allowed is "unknown", never true.

Independent third-party API for developers and researchers. Not affiliated with, endorsed by, or sponsored by Reddit, Inc.

On this page