{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "projectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "project ID from create/list."
    },
    "watchId": {
      "description": "watch ID from create/list.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "contactId": {
      "description": "contact ID from create/list.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Caller-generated key reused only for retries of the same operation and arguments in this workspace."
    },
    "source": {
      "type": "object",
      "properties": {
        "namespace": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "accountRef": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "recordRef": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "eventId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        }
      },
      "required": [
        "namespace",
        "accountRef",
        "recordRef",
        "eventId"
      ],
      "additionalProperties": false
    },
    "outcome": {
      "type": "string",
      "enum": [
        "contacted",
        "replied",
        "publication_promised",
        "declined",
        "publication_claimed",
        "bounced",
        "send_error",
        "wrong_person",
        "do_not_contact",
        "email_health"
      ]
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "contactRevision": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "associationRevision": {
      "anyOf": [
        {
          "type": "number",
          "const": 0
        },
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      ]
    },
    "method": {
      "default": "none",
      "type": "string",
      "enum": [
        "email",
        "contact_url",
        "none"
      ]
    },
    "validity": {
      "type": "string",
      "enum": [
        "valid",
        "role",
        "invalid",
        "catch-all",
        "unknown"
      ]
    },
    "restrictionScope": {
      "type": "string",
      "enum": [
        "method",
        "contact",
        "publisher"
      ]
    }
  },
  "required": [
    "projectId",
    "idempotencyKey",
    "source",
    "outcome",
    "occurredAt",
    "method"
  ],
  "additionalProperties": false
}
