{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bewary/json-schema/bewary-watch-created-schema.json",
  "title": "WatchCreated",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bewary-openapi.json#/components/schemas/WatchCreated",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "description": "wch_ + a ULID."
    },
    "entity": {
      "$ref": "#/$defs/WatchEntity"
    },
    "events": {
      "items": {
        "type": "string",
        "enum": [
          "domain.ip_changed",
          "domain.ns_changed",
          "domain.down",
          "domain.up",
          "domain.parked",
          "domain.listed",
          "domain.delisted",
          "domain.reregistered",
          "domain.expiring",
          "domain.expired",
          "domain.held",
          "phone.listed",
          "phone.delisted",
          "wallet.listed",
          "wallet.delisted",
          "wallet.sanctioned",
          "brand.lookalike_registered",
          "brand.lookalike_cert",
          "brand.lookalike_live"
        ]
      },
      "type": "array",
      "title": "Events",
      "description": "The event types this watch produces."
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "paused"
      ],
      "title": "Status",
      "description": "paused: the balance could not pay a day; a top-up resumes it and produces the gap."
    },
    "created_at": {
      "type": "string",
      "title": "Created At",
      "description": "RFC 3339 UTC."
    },
    "paid_until": {
      "type": "string",
      "title": "Paid Until",
      "description": "Events are produced for changes up to this time. RFC 3339 UTC."
    },
    "paused_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Paused At"
    },
    "last_event_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Event At"
    },
    "credits_per_day": {
      "type": "integer",
      "title": "Credits Per Day",
      "description": "What a day of this watch costs (PRICING section 3.1)."
    },
    "created": {
      "type": "boolean",
      "title": "Created",
      "description": "false: a live watch on this entity existed; its event types were updated and nothing was charged."
    },
    "credits": {
      "type": "integer",
      "title": "Credits",
      "description": "Credits charged by this call: the first day of a new watch."
    }
  },
  "type": "object",
  "required": [
    "id",
    "entity",
    "events",
    "status",
    "created_at",
    "paid_until",
    "credits_per_day",
    "created",
    "credits"
  ],
  "$defs": {
    "WatchEntity": {
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "domain",
            "phone",
            "wallet",
            "brand"
          ],
          "title": "Type",
          "description": "What is watched: a domain or host, an E.164 phone number, a wallet address, or a brand id of the lookalike registry."
        },
        "value": {
          "type": "string",
          "maxLength": 320,
          "minLength": 1,
          "title": "Value",
          "description": "As in the lookup endpoints. Stored in canonical form (the answer shows it)."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "type",
        "value"
      ],
      "title": "WatchEntity"
    }
  }
}