{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentrux-com/json-schema/agentrux-com-kratos-logout-webhook-payload-schema.json",
  "title": "KratosLogoutWebhookPayload",
  "description": "Kratos `after.logout` hook payload (Phase 1.7c、 2026-05-17 追加).\n\nSSOT: docs/04_design/auth/idp_replacement.md §4-3-A (after.logout 拡張)\nKratos が logout flow 完了時に AgenTrux に通知する。 payload shape は\nKratos config の body template に依存するため、 弱依存 (両 field optional)\nで受け取り、 caller は session_id 優先 → identity_id fallback。",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentrux-com-openapi.json#/components/schemas/KratosLogoutWebhookPayload",
  "properties": {
    "flow": {
      "type": "string",
      "const": "logout",
      "title": "Flow"
    },
    "kratos_session_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 128,
          "minLength": 8
        },
        {
          "type": "null"
        }
      ],
      "title": "Kratos Session Id",
      "description": "Kratos session ID (logged out)"
    },
    "identity_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 128,
          "minLength": 8
        },
        {
          "type": "null"
        }
      ],
      "title": "Identity Id",
      "description": "Kratos identity ID (logout 元、 session_id 不在時 fallback)"
    }
  },
  "type": "object",
  "required": [
    "flow"
  ]
}