{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pipecorn-com/json-schema/pipecorn-com-lead-schema.json",
  "title": "Lead",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pipecorn-com-openapi.json#/components/schemas/Lead",
  "type": "object",
  "properties": {
    "lead": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "QUALIFIED",
            "DISQUALIFIED"
          ],
          "description": "Current qualification status of the lead"
        },
        "rejection_reasons": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Reasons for rejection if disqualified"
        },
        "first_name": {
          "type": "string",
          "description": "First name of the lead"
        },
        "last_name": {
          "type": "string",
          "description": "Last name of the lead"
        },
        "gender": {
          "type": [
            "string",
            "null"
          ],
          "description": "Gender of the lead"
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "description": "Most probable email address"
        },
        "email_status": {
          "type": [
            "string",
            "null"
          ],
          "description": "Deliverability status of the email (e.g. Valid, Catch-all)"
        },
        "phone": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "List of phone number records"
        },
        "linkedin_url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "LinkedIn profile URL"
        },
        "linkedin_id_url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "LinkedIn profile URL built from the member's stable id"
        },
        "profile_image_url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "Profile image URL"
        },
        "location": {
          "type": [
            "string",
            "null"
          ],
          "description": "Location of the lead"
        },
        "title": {
          "type": [
            "string",
            "null"
          ],
          "description": "Job title of the lead"
        },
        "lk_headline": {
          "type": [
            "string",
            "null"
          ],
          "description": "LinkedIn headline"
        },
        "hire_type": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "new_hire",
            "promoted"
          ],
          "description": "Whether the lead recently joined the company (new_hire) or was promoted within it"
        },
        "current_position": {
          "type": [
            "object",
            "null"
          ],
          "description": "The lead's current position"
        },
        "previous_position": {
          "type": [
            "object",
            "null"
          ],
          "description": "The lead's previous position"
        },
        "positions": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "object"
          },
          "description": "The lead's position history"
        },
        "years_in_position": {
          "type": "integer",
          "description": "Years in current position (0 when unknown)"
        },
        "months_in_position": {
          "type": "integer",
          "description": "Months in current position (0 when unknown)"
        },
        "years_in_company": {
          "type": "integer",
          "description": "Years in current company (0 when unknown)"
        },
        "months_in_company": {
          "type": "integer",
          "description": "Months in current company (0 when unknown)"
        }
      }
    },
    "company": {
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Company name"
        },
        "cleaned_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Cleaned company name"
        },
        "website": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "Company website"
        },
        "location": {
          "type": [
            "string",
            "null"
          ],
          "description": "Company location"
        },
        "industry": {
          "type": [
            "string",
            "null"
          ],
          "description": "Company industry"
        },
        "headquarters": {
          "type": [
            "object",
            "null"
          ],
          "description": "Company headquarters details (returned only when available as structured data)"
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Company description"
        },
        "linkedin_url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "Company LinkedIn profile URL"
        },
        "linkedin_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Company LinkedIn identifier"
        },
        "employee_range": {
          "type": [
            "string",
            "null"
          ],
          "description": "Company employee count range"
        },
        "company_profile_picture": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "Company profile picture URL"
        }
      }
    }
  }
}