{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/knoxcall/json-schema/knoxcall-egress-observation-receipt-schema.json",
  "title": "EgressObservationReceipt",
  "description": "What happened to the batch. `accepted + dropped` equals the number of observations sent.",
  "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/EgressObservationReceipt",
  "type": "object",
  "required": [
    "accepted",
    "dropped",
    "reasons",
    "redacted"
  ],
  "properties": {
    "accepted": {
      "type": "integer",
      "description": "Entries merged into the space's observations."
    },
    "dropped": {
      "type": "integer",
      "description": "Entries refused, each counted under exactly one reason."
    },
    "reasons": {
      "type": "object",
      "description": "Dropped entries per reason. Keys are from the closed set `malformed`, `invalid_host`, `ip_literal`, `own_host`, `invalid_first_segment`, `invalid_method`, `invalid_header_name`, `invalid_count`, `invalid_timestamp`, `stale`, `future`, `daily_cap`; a reason with no drops is omitted.",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "redacted": {
      "type": "object",
      "description": "Accepted entries that were altered before storage, per reason. The one reason today is `first_segment_looks_like_credential`: a first path segment that looks like it carries a secret (a Telegram `bot<id>:<token>`, a known key prefix, a long or high-entropy token) is stored as `/`, so a credential value never reaches a row. A reason with no redactions is omitted.",
      "additionalProperties": {
        "type": "integer"
      }
    }
  }
}