{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "projectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_-]+$",
      "description": "project ID from create/list."
    },
    "candidates": {
      "minItems": 1,
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "minLength": 3,
            "maxLength": 300
          },
          "rationale": {
            "type": "object",
            "properties": {
              "relationship": {
                "type": "string",
                "enum": [
                  "business",
                  "search",
                  "shared_backlink_neighbor",
                  "unknown"
                ]
              },
              "audience": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "topic": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "evidence": {
                "maxItems": 5,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "source_url": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2048
                    },
                    "note": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    }
                  },
                  "required": [
                    "source_url",
                    "note"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "relationship",
              "audience",
              "topic",
              "evidence"
            ],
            "additionalProperties": false
          },
          "expectedRevision": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740990
              },
              {
                "type": "null"
              }
            ]
          },
          "expectedSnapshot": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "domain",
          "rationale"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "projectId",
    "candidates"
  ],
  "additionalProperties": false
}
