{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/anthid-com/json-schema/anthid-com-list-control-changes-response-schema.json",
  "title": "ListControlChangesResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/anthid-com-account-manual-controls-api-openapi.yml#/components/schemas/ListControlChangesResponse",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ControlChange"
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "$defs": {
    "ControlChange": {
      "type": "object",
      "description": "One recorded change to a control.\n\nDeliberately omits `principal_id`, `request_id`, `source_ip` and the\nidempotency key. They exist on the record and matter to an investigation,\nbut none of them is readable by the tenant and two of them are internal\ncorrelation values. This is the supervisory view, not the audit export.",
      "required": [
        "control_kind",
        "scope",
        "event_type",
        "set_fields",
        "cleared_fields",
        "changed_by",
        "changed_at"
      ],
      "properties": {
        "changed_at": {
          "type": "string",
          "format": "date-time"
        },
        "changed_by": {
          "$ref": "#/$defs/ControlChangedBy"
        },
        "cleared_fields": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Fields this change removed."
        },
        "control_kind": {
          "type": "string",
          "description": "Which family of control changed: manual, risk, or time."
        },
        "event_type": {
          "type": "string",
          "description": "Whether the change set fields or removed the control outright."
        },
        "scope": {
          "type": "string",
          "description": "Which level it sits at: organization, account, or symbol."
        },
        "set_fields": {
          "description": "Fields this change set, as supplied."
        },
        "symbol": {
          "type": [
            "string",
            "null"
          ],
          "description": "Present only for a symbol-scoped control."
        }
      }
    },
    "ControlChangedBy": {
      "type": "string",
      "description": "Who changed a control, as much as is useful to say.\n\nThe class of credential only -- never the identifier behind it. An\n`api_key_id` or an external user id means nothing to the tenant reading it,\nlooks like a leak, and would be worse than showing nothing at all. What a\nsupervising tenant actually needs first is whether one of their people did\nthis or one of their automated keys did, and that is answerable without\nnaming anyone.\n\nA resolved display name belongs here later, once identities can be turned\ninto labels. Until then this stays deliberately coarse rather than\ndeliberately opaque.",
      "enum": [
        "API_KEY",
        "USER",
        "SERVICE"
      ]
    }
  }
}