{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aimeat-io/json-schema/aimeat-io-flag-request-schema.json",
  "title": "FlagRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aimeat-io-flags-api-openapi.yml#/components/schemas/FlagRequest",
  "type": "object",
  "required": [
    "targetType",
    "targetId",
    "reason"
  ],
  "properties": {
    "targetType": {
      "type": "string",
      "enum": [
        "memory",
        "board_post",
        "action",
        "agent",
        "app",
        "ai_provenance"
      ],
      "description": "Type of resource being flagged. `app` names a published app as `owner/filename`; `ai_provenance` names a provenance record id - the identifier a reader already has, because a visible AI label links to `/v1/provenance/{id}`.\n"
    },
    "targetId": {
      "type": "string",
      "description": "ID of the flagged resource"
    },
    "reason": {
      "type": "string",
      "enum": [
        "unreliable",
        "inappropriate",
        "illegal",
        "spam",
        "other",
        "undisclosed_ai"
      ],
      "description": "Reason for the flag. `undisclosed_ai` is the AI Act correction procedure (Code of Practice Section 2, Commitment 2): content that should carry an AI label and does not. It routes into this same moderation queue rather than a separate inbox.\n"
    },
    "description": {
      "type": "string",
      "maxLength": 1000,
      "description": "Optional detailed description"
    }
  }
}