{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/threadsnoop-com/json-schema/threadsnoop-com-subreddit-rules-envelope-schema.json",
  "title": "SubredditRulesEnvelope",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/threadsnoop-com-openapi.json#/components/schemas/SubredditRulesEnvelope",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "subreddit": {
          "type": "string"
        },
        "rules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SubredditRule"
          }
        }
      }
    },
    "_threadsnoop": {
      "$ref": "#/$defs/Envelope"
    }
  },
  "$defs": {
    "Envelope": {
      "type": "object",
      "properties": {
        "cursor": {
          "type": [
            "integer",
            "null"
          ],
          "description": "created_utc of the last row in this page (raw page, pre-filter if q= was used). Pass as `after` (sort=asc) or `before` (sort=desc) to fetch the next page. Null when the page was empty or the endpoint isn't paginated."
        },
        "has_more": {
          "type": "boolean"
        },
        "credits_used": {
          "type": "integer"
        },
        "credits_remaining": {
          "type": "integer"
        }
      },
      "required": [
        "credits_used",
        "credits_remaining"
      ]
    },
    "SubredditRule": {
      "type": "object",
      "properties": {
        "short_name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "priority": {
          "type": "integer"
        }
      }
    }
  }
}