Maintenance - We're currently working on things and you might experience some issues. Should be wrapped up soon!

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

7
Documentation for the `/api/report` endpoint and, especially, valid values for parameters
Post Body

There's precious-little documentation on valid input for the /api/report endpoint. The endpoint accepts the following parameters:

additional_info: a string no longer than 2000 characters
custom_text: a string no longer than 2000 characters
other_reason: a string no longer than 100 characters
reason: a string no longer than 100 characters
rule_reason: a string no longer than 100 characters
site_reason: a string no longer than 100 characters
  1. What's the difference between additional_info and custom_text?
  2. Does site_reason expect the full report reason string (e.g. "It's targeted harassment at me") or the constant form (e.g. "HARASSMENT_AT_ME")?
  3. If the latter, then what does rule_reason expect? Since rules are user-defined, there will not be a predefined constant like for site_rule.
  4. If we're using site_reason and rule_reason then what does plain reason do?
  5. What's other_reason for? Is it for freeform reports? If so, what do custom_text and additional_info do?

Bonus question: what's the proper way to handle complaint-type reports? Some site-wide rules have additional parameters (taken from /r/subreddit/about/rules.json under the site_rules_flow object):

      {
        "complaintButtonText": "File a complaint",
        "complaintUrl": "https://www.reddit.com/api/report_redirect?thing=%(thing)s&reason_code=NETZDG&feature=from_r2",
        "complaintPageTitle": "File a complaint?",
        "reasonText": "Report this content under NetzDG",
        "reasonTextToShow": "Report this content under NetzDG",
        "fileComplaint": true,
        "complaintPrompt": "This reporting procedure is only available for people in Germany. If you are in Germany and would like to report this content under the German Netzwerkdurchsetzungsgesetz (NetzDG) law you may file a complaint by clicking the link below."
      },
      {
        "usernamesInputTitle": "Username",
        "reasonTextToShow": "Someone is considering suicide or serious self-harm.",
        "canSpecifyUsernames": true,
        "reasonText": "Someone is considering suicide or serious self-harm.",
        "requestCrisisSupport": true,
        "oneUsername": true
      }

Is the proper way to:

  1. Send reasonText like a regular report and ignore all the other special fields; or
  2. Send reasonText like a regular report, ignore all other fields, AND redirect the user to the complaintUrl;
  3. Send reasonText like a regular report and include all other fields (such as fileComplaint or requestCrisisSupport); or
  4. Send reasonText and the other parameters to the complaintUrl instead of the default /api/report endpoint?

EDIT: Code formatting

Author
Account Strength
100%
Account Age
10 years
Verified Email
Yes
Verified Flair
No
Total Karma
42,322
Link Karma
1,947
Comment Karma
39,528
Profile updated: 3 days ago
Bot Developer

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago