{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/knoxcall/json-schema/knoxcall-intercept-manifest-schema.json",
  "title": "InterceptManifest",
  "description": "GET /wrap/intercept-manifest. Which upstream hosts an intercept-enabled Route covers for one environment of this space.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/knoxcall-wrap-credentials-api-openapi.yml#/components/schemas/InterceptManifest",
  "type": "object",
  "required": [
    "version",
    "ttl_seconds",
    "environment",
    "sandbox",
    "routes"
  ],
  "properties": {
    "version": {
      "type": "string",
      "description": "Content hash of `routes`; doubles as the ETag."
    },
    "ttl_seconds": {
      "type": "integer",
      "description": "How long the SDK should hold this manifest before polling again."
    },
    "environment": {
      "type": "string"
    },
    "sandbox": {
      "type": "boolean"
    },
    "routes": {
      "type": "array",
      "description": "Sorted by host, then longest `base_path` first, then slug — the order a longest-prefix match reads.",
      "items": {
        "type": "object",
        "required": [
          "host",
          "base_path",
          "slug",
          "route_id",
          "requires_clients",
          "allowed_methods"
        ],
        "properties": {
          "host": {
            "type": "string",
            "description": "Lower-case DNS hostname, no port, trailing dot stripped."
          },
          "base_path": {
            "type": "string",
            "description": "Path prefix the route serves under (`/` when its target has none). The SDK forwards the request path with this prefix removed; a request not under any listed prefix for the host is not a route match."
          },
          "slug": {
            "type": "string",
            "description": "Send as `x-knoxcall-route`."
          },
          "route_id": {
            "type": "string",
            "format": "uuid"
          },
          "requires_clients": {
            "type": "boolean",
            "description": "The environment requires a registered client (IP, mTLS or signed assertion). A bearer-only SDK call will be refused; the SDK warns at install and never falls back."
          },
          "allowed_methods": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Upper-cased verbs when method restrictions are on for this environment; null otherwise."
          },
          "ambiguous": {
            "type": "boolean",
            "description": "Present and true when another entry shares this (host, base_path); the SDK takes the lexically lowest slug and warns."
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      }
    }
  }
}