{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://recruitly.dev/backup-schema/v1/contacts.schema.json",
  "title": "Contacts",
  "description": "The people at your clients. Client portal passwords are never included.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "tenantId": {
      "type": [
        "string",
        "null"
      ]
    },
    "reference": {
      "type": [
        "string",
        "null"
      ]
    },
    "owner": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "createdOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "modifiedOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "archived": {
      "type": "boolean"
    },
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "firstName": {
      "type": [
        "string",
        "null"
      ]
    },
    "surname": {
      "type": [
        "string",
        "null"
      ]
    },
    "headline": {
      "type": [
        "string",
        "null"
      ]
    },
    "email": {
      "type": [
        "string",
        "null"
      ]
    },
    "alternateEmail": {
      "type": [
        "string",
        "null"
      ]
    },
    "mobile": {
      "type": [
        "string",
        "null"
      ]
    },
    "homePhone": {
      "type": [
        "string",
        "null"
      ]
    },
    "workPhone": {
      "type": [
        "string",
        "null"
      ]
    },
    "linkedIn": {
      "type": [
        "string",
        "null"
      ]
    },
    "doNotContact": {
      "type": "boolean"
    },
    "optoutEmails": {
      "type": "boolean"
    },
    "optoutSMS": {
      "type": "boolean"
    },
    "address": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "line": {
          "type": [
            "string",
            "null"
          ]
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "region": {
          "type": [
            "string",
            "null"
          ]
        },
        "postCode": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "company": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "status": {
      "type": [
        "string",
        "null"
      ]
    },
    "source": {
      "type": [
        "string",
        "null"
      ]
    },
    "sectors": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "industries": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "customFields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": [
              "string",
              "null"
            ]
          },
          "value": {
            "type": [
              "string",
              "number",
              "boolean",
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      }
    }
  },
  "required": [
    "id",
    "tenantId",
    "reference",
    "owner",
    "createdOn",
    "modifiedOn",
    "archived",
    "title",
    "firstName",
    "surname",
    "headline",
    "email",
    "alternateEmail",
    "mobile",
    "homePhone",
    "workPhone",
    "linkedIn",
    "doNotContact",
    "optoutEmails",
    "optoutSMS",
    "address",
    "company",
    "status",
    "source",
    "sectors",
    "industries",
    "customFields"
  ],
  "additionalProperties": false
}
