{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/financegenius-ai/json-schema/financegenius-ai-switch-in-schema.json",
  "title": "SwitchIn",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/financegenius-ai-crm-agent-controls-api-openapi.yml#/components/schemas/SwitchIn",
  "properties": {
    "scope_kind": {
      "type": "string",
      "pattern": "^(global|agent|channel|lender|panic)$",
      "title": "Scope Kind"
    },
    "scope_key": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[a-z0-9][a-z0-9_]{0,39}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Scope Key"
    },
    "state": {
      "type": "string",
      "pattern": "^(on|off|shadow|live|tripped|clear)$",
      "title": "State"
    },
    "reason": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]{0,39}$",
      "title": "Reason"
    }
  },
  "type": "object",
  "required": [
    "scope_kind",
    "state",
    "reason"
  ]
}