{
  "$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."
    },
    "revision": {
      "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)$",
          "description": "Revision of this saved contact. Supply it as revision when updating or deleting the contact."
        }
      ],
      "description": "Current contact revision from list_contacts or save_contact; 0 creates."
    },
    "contact": {
      "type": "object",
      "properties": {
        "externalRef": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "email": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 254,
              "format": "email",
              "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "contactUrl": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2000,
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "externalRef",
        "name",
        "email",
        "contactUrl"
      ],
      "additionalProperties": false
    },
    "acceptTermsVersion": {
      "description": "Supply the current terms version only after an owner or administrator explicitly agrees for everyone saving contacts on this website. Never infer agreement from an import or contact read.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    }
  },
  "required": [
    "projectId",
    "revision",
    "contact"
  ],
  "additionalProperties": false
}
