{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/commsharbor/json-schema/commsharbor-lead-schema.json",
  "title": "Lead",
  "description": "A prospective ORGANIZATION in the platform CRM. This is our own pipeline about tenants — it is not tenant data, and it is only reachable with an explicit platform grant.",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/commsharbor-platform-api-openapi.yml#/components/schemas/Lead",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Lead ID."
    },
    "email": {
      "type": "string",
      "description": "Contact email for the lead."
    },
    "name": {
      "type": "string",
      "description": "Who to talk to."
    },
    "company_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Name of the prospective organization."
    },
    "source": {
      "type": [
        "string",
        "null"
      ],
      "description": "Where the lead came from, e.g. `manual`."
    },
    "stage": {
      "type": "string",
      "description": "Where the lead is in our own funnel, e.g. `new`."
    },
    "organization_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The organization this lead became, once it converted."
    },
    "created_at": {
      "type": "string",
      "description": "Creation time (UTC)."
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "Last change (UTC)."
    },
    "url": {
      "type": "string",
      "description": "Absolute URL of this lead."
    }
  },
  "required": [
    "id",
    "email",
    "name",
    "company_name",
    "source",
    "stage",
    "organization_id",
    "created_at",
    "updated_at",
    "url"
  ]
}