{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Contact",
  "title": "Contact",
  "type": "object",
  "x-apideck-schema-id": "Contact",
  "x-apideck-weights": {
    "id": "critical",
    "name": "critical",
    "owner_id": "medium",
    "type": "medium",
    "company_id": "high",
    "company_name": "medium",
    "lead_id": "medium",
    "first_name": "high",
    "middle_name": "low",
    "last_name": "high",
    "prefix": "low",
    "suffix": "low",
    "title": "medium",
    "department": "medium",
    "language": "medium",
    "gender": "medium",
    "birthday": "medium",
    "image": "medium",
    "photo_url": "medium",
    "lead_source": "low",
    "fax": "low",
    "description": "low",
    "current_balance": "edge-case",
    "status": "edge-case",
    "active": "edge-case",
    "websites": "medium",
    "addresses": "high",
    "social_links": "low",
    "phone_numbers": "high",
    "emails": "high",
    "email_domain": "edge-case",
    "custom_fields": "medium",
    "tags": "low",
    "first_call_at": "edge-case",
    "first_email_at": "edge-case",
    "last_activity_at": "medium",
    "updated_at": "high",
    "created_at": "medium",
    "opportunity_ids": "low"
  },
  "x-pii": [
    "name",
    "first_name",
    "middle_name",
    "last_name",
    "email"
  ],
  "properties": {
    "id": {
      "description": "Unique identifier for the contact.",
      "type": "string",
      "example": "12345",
      "readOnly": true
    },
    "name": {
      "description": "Full name of the contact.",
      "type": "string",
      "example": "Elon Musk",
      "nullable": true
    },
    "owner_id": {
      "description": "The owner of the contact.",
      "type": "string",
      "example": "54321",
      "nullable": true
    },
    "type": {
      "description": "The type of the contact.",
      "type": "string",
      "example": "personal",
      "x-apideck-enum-id": "contacts.type",
      "enum": [
        "customer",
        "supplier",
        "employee",
        "personal"
      ],
      "nullable": true
    },
    "company_id": {
      "description": "The company the contact is associated with.",
      "type": "string",
      "example": "23456",
      "nullable": true
    },
    "company_name": {
      "description": "The name of the company the contact is associated with.",
      "type": "string",
      "example": "23456",
      "nullable": true
    },
    "lead_id": {
      "description": "The lead the contact is associated with.",
      "type": "string",
      "example": "34567",
      "nullable": true
    },
    "first_name": {
      "description": "The first name of the contact.",
      "type": "string",
      "example": "Elon",
      "nullable": true
    },
    "middle_name": {
      "description": "The middle name of the contact.",
      "type": "string",
      "example": "D.",
      "nullable": true
    },
    "last_name": {
      "description": "The last name of the contact.",
      "type": "string",
      "example": "Musk",
      "nullable": true
    },
    "prefix": {
      "description": "The prefix of the contact.",
      "type": "string",
      "example": "Mr.",
      "nullable": true
    },
    "suffix": {
      "description": "The suffix of the contact.",
      "type": "string",
      "example": "PhD",
      "nullable": true
    },
    "title": {
      "description": "The job title of the contact.",
      "type": "string",
      "example": "CEO",
      "nullable": true
    },
    "department": {
      "description": "The department of the contact.",
      "type": "string",
      "example": "Engineering",
      "nullable": true
    },
    "language": {
      "type": "string",
      "example": "EN",
      "description": "language code according to ISO 639-1. For the United States - EN",
      "nullable": true
    },
    "gender": {
      "type": "string",
      "x-apideck-enum-id": "contacts.gender",
      "enum": [
        "male",
        "female",
        "unisex"
      ],
      "description": "The gender of the contact.",
      "example": "female",
      "nullable": true
    },
    "birthday": {
      "description": "The birthday of the contact.",
      "type": "string",
      "example": "2000-08-12",
      "nullable": true
    },
    "image": {
      "type": "string",
      "example": "https://unavatar.io/elon-musk",
      "nullable": true,
      "deprecated": true
    },
    "photo_url": {
      "type": "string",
      "title": "Photo URL",
      "description": "The URL of the photo of a person.",
      "example": "https://unavatar.io/elon-musk",
      "nullable": true
    },
    "lead_source": {
      "description": "The lead source of the contact.",
      "type": "string",
      "example": "Cold Call",
      "nullable": true
    },
    "fax": {
      "description": "The fax number of the contact.",
      "type": "string",
      "example": "+12129876543",
      "nullable": true
    },
    "description": {
      "description": "The description of the contact.",
      "type": "string",
      "title": "Description",
      "example": "Internal champion",
      "nullable": true
    },
    "current_balance": {
      "description": "The current balance of the contact.",
      "type": "number",
      "title": "Current Balance",
      "example": 10.5,
      "nullable": true
    },
    "status": {
      "description": "The status of the contact.",
      "type": "string",
      "example": "open",
      "nullable": true
    },
    "active": {
      "description": "The active status of the contact.",
      "type": "boolean",
      "example": true,
      "nullable": true
    },
    "websites": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Website"
      }
    },
    "addresses": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Address"
      }
    },
    "social_links": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SocialLink"
      }
    },
    "phone_numbers": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/PhoneNumber"
      }
    },
    "emails": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Email"
      }
    },
    "email_domain": {
      "type": "string",
      "example": "gmail.com",
      "nullable": true
    },
    "custom_fields": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/CustomField"
      },
      "nullable": true
    },
    "tags": {
      "$ref": "#/components/schemas/Tags"
    },
    "first_call_at": {
      "description": "The first call date of the contact.",
      "type": "string",
      "format": "date-time",
      "example": "2020-09-30T07:43:32.000Z",
      "readOnly": true,
      "nullable": true
    },
    "first_email_at": {
      "description": "The first email date of the contact.",
      "type": "string",
      "format": "date-time",
      "example": "2020-09-30T07:43:32.000Z",
      "readOnly": true,
      "nullable": true
    },
    "last_activity_at": {
      "description": "The last activity date of the contact.",
      "type": "string",
      "format": "date-time",
      "example": "2020-09-30T07:43:32.000Z",
      "readOnly": true,
      "nullable": true
    },
    "custom_mappings": {
      "$ref": "#/components/schemas/CustomMappings"
    },
    "updated_at": {
      "description": "The last update date of the contact.",
      "type": "string",
      "format": "date-time",
      "example": "2017-08-12T20:43:21.291Z",
      "readOnly": true,
      "nullable": true
    },
    "created_at": {
      "description": "The creation date of the contact.",
      "type": "string",
      "format": "date-time",
      "example": "2017-08-12T20:43:21.291Z",
      "readOnly": true,
      "nullable": true
    },
    "opportunity_ids": {
      "description": "The opportunity ids of the contact.",
      "type": "array",
      "items": {
        "type": "string",
        "example": "12345"
      }
    },
    "pass_through": {
      "$ref": "#/components/schemas/PassThroughBody"
    }
  },
  "additionalProperties": false
}