{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recordwirehq-com/json-schema/recordwirehq-com-subscription-schema.json",
  "title": "Subscription",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recordwirehq-com-openapi.json#/components/schemas/Subscription",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "owner": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "jurisdictions": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "entity_ids": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "event_types": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "business.created",
              "business.name_changed",
              "business.status_changed",
              "business.address_changed",
              "business.agent_changed",
              "business.officers_changed"
            ]
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "cursor": {
      "type": "string",
      "description": "Id of the last event delivered."
    },
    "failures": {
      "type": "integer",
      "description": "Failed batches in a row."
    },
    "disabled_at": {
      "oneOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "disabled_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "revoked_at": {
      "oneOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}