{
  "lexicon": 1,
  "id": "com.atproto.moderation.createReport",
  "defs": {
    "main": {
      "type": "procedure",
      "description": "Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": [
            "reasonType",
            "subject"
          ],
          "properties": {
            "modTool": {
              "type": "ref",
              "ref": "#modTool"
            },
            "reason": {
              "type": "string",
              "description": "Additional context about the content and violation.",
              "maxLength": 20000,
              "maxGraphemes": 2000
            },
            "reasonType": {
              "type": "ref",
              "description": "Indicates the broad category of violation the report is for.",
              "ref": "com.atproto.moderation.defs#reasonType"
            },
            "subject": {
              "type": "union",
              "refs": [
                "com.atproto.admin.defs#repoRef",
                "com.atproto.repo.strongRef"
              ]
            }
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": [
            "id",
            "reasonType",
            "subject",
            "reportedBy",
            "createdAt"
          ],
          "properties": {
            "createdAt": {
              "type": "string",
              "format": "datetime"
            },
            "id": {
              "type": "integer"
            },
            "reason": {
              "type": "string",
              "maxLength": 20000,
              "maxGraphemes": 2000
            },
            "reasonType": {
              "type": "ref",
              "ref": "com.atproto.moderation.defs#reasonType"
            },
            "reportedBy": {
              "type": "string",
              "format": "did"
            },
            "subject": {
              "type": "union",
              "refs": [
                "com.atproto.admin.defs#repoRef",
                "com.atproto.repo.strongRef"
              ]
            }
          }
        }
      }
    },
    "modTool": {
      "type": "object",
      "description": "Moderation tool information for tracing the source of the action",
      "required": [
        "name"
      ],
      "properties": {
        "meta": {
          "type": "unknown",
          "description": "Additional arbitrary metadata about the source"
        },
        "name": {
          "type": "string",
          "description": "Name/identifier of the source (e.g., 'bsky-app/android', 'bsky-web/chrome')"
        }
      }
    }
  }
}