{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/copper-financial/main/json-schema/copper-financial-lead-schema.json",
  "title": "Lead",
  "x-generated": "2026-10-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/copper-financial-openapi.json#/components/schemas/Lead",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Unique identifier for the lead"
    },
    "name": {
      "type": "string",
      "description": "The first and last name of the lead"
    },
    "prefix": {
      "type": [
        "string",
        "null"
      ],
      "description": "Name prefix"
    },
    "first_name": {
      "type": "string",
      "description": "First name of the lead"
    },
    "last_name": {
      "type": "string",
      "description": "Last name of the lead"
    },
    "middle_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Middle name of the lead"
    },
    "suffix": {
      "type": [
        "string",
        "null"
      ],
      "description": "Name suffix"
    },
    "address": {
      "type": "object",
      "description": "An object containing the lead's address",
      "properties": {
        "street": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "postal_code": {
          "type": "string"
        },
        "country": {
          "type": "string"
        }
      }
    },
    "assignee_id": {
      "type": "integer",
      "description": "Unique identifier of the user that will be the owner of the lead"
    },
    "company_name": {
      "type": "string",
      "description": "The name of the company to which the lead belongs"
    },
    "customer_source_id": {
      "type": "integer",
      "description": "Unique identifier of the customer source that generated this lead"
    },
    "details": {
      "type": "string",
      "description": "Description of the lead"
    },
    "email": {
      "type": "object",
      "description": "An object containing the lead's email address and category",
      "properties": {
        "email": {
          "type": "string",
          "format": "email"
        },
        "category": {
          "type": "string"
        }
      }
    },
    "monetary_value": {
      "type": "number",
      "description": "The expected monetary value of business with the lead"
    },
    "phone_numbers": {
      "type": "array",
      "description": "An array of phone numbers belonging to the lead",
      "items": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "description": "A phone number"
          },
          "category": {
            "type": "string",
            "description": "The category of the phone number"
          }
        }
      }
    },
    "socials": {
      "type": "array",
      "description": "An array of social profiles belonging to the lead",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The URL of a social profile"
          },
          "category": {
            "type": "string",
            "description": "The category of the social profile"
          }
        }
      }
    },
    "status": {
      "type": "string",
      "description": "A string representing the status of the lead",
      "enum": [
        "New",
        "Unqualified",
        "Contacted",
        "Qualified"
      ]
    },
    "status_id": {
      "type": "integer",
      "description": "Unique identifier of the lead status"
    },
    "tags": {
      "type": "array",
      "description": "An array of the tags associated with the lead",
      "items": {
        "type": "string"
      }
    },
    "title": {
      "type": "string",
      "description": "The professional title of the lead"
    },
    "websites": {
      "type": "array",
      "description": "An array of websites belonging to the lead",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The URL of a website"
          },
          "category": {
            "type": "string",
            "description": "The category of the website"
          }
        }
      }
    },
    "custom_fields": {
      "type": "array",
      "description": "An array of custom field values belonging to the lead. When custom_field_computed_values query parameter is true, each field will include a computed_value with human-readable labels for Dropdown and Multi-select fields.",
      "items": {
        "type": "object",
        "properties": {
          "custom_field_definition_id": {
            "type": "integer",
            "description": "The id of the custom field definition for which this custom field stores a value"
          },
          "value": {
            "description": "The value (number, string, option id, or timestamp) of this custom field",
            "nullable": true
          },
          "computed_value": {
            "description": "The human-readable value of this custom field. For Dropdown/Multi-select fields, this contains the option label(s) instead of IDs. Only present when custom_field_computed_values=true is specified.",
            "nullable": true
          }
        }
      }
    },
    "date_created": {
      "type": "integer",
      "description": "A Unix timestamp representing the time at which this lead was created"
    },
    "date_modified": {
      "type": "integer",
      "description": "A Unix timestamp representing the time at which this lead was last modified"
    },
    "date_last_contacted": {
      "type": "integer",
      "description": "A Unix timestamp representing the time at which this lead was last contacted"
    }
  },
  "required": [
    "id",
    "name"
  ]
}