{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coldrig-dev/json-schema/coldrig-dev-lead-list-page-schema.json",
  "title": "LeadListPage",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coldrig-dev-leads-api-openapi.yml#/components/schemas/LeadListPage",
  "type": "object",
  "required": [
    "leads",
    "nextCursor"
  ],
  "properties": {
    "leads": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "leadId",
          "email",
          "firstName",
          "company",
          "campaignId",
          "campaignName",
          "globalStatus",
          "interestStatus",
          "notes",
          "tags",
          "suppressed",
          "lastEventType",
          "lastEventTs",
          "createdAt"
        ],
        "properties": {
          "leadId": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "campaignId": {
            "type": "string"
          },
          "campaignName": {
            "type": "string"
          },
          "globalStatus": {
            "type": "string"
          },
          "interestStatus": {
            "$ref": "#/$defs/LeadInterestStatus"
          },
          "notes": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "suppressed": {
            "type": "boolean"
          },
          "lastEventType": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastEventTs": {
            "type": [
              "integer",
              "null"
            ]
          },
          "createdAt": {
            "type": "integer"
          }
        }
      }
    },
    "nextCursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "$defs": {
    "LeadInterestStatus": {
      "type": "string",
      "enum": [
        "none",
        "interested",
        "meeting_booked",
        "not_now",
        "not_interested",
        "bad_fit",
        "out_of_office",
        "wrong_person",
        "referral",
        "question",
        "objection",
        "hostile"
      ],
      "description": "Also labels the contact's latest reply for experiments (reply taxonomy v1): interested, meeting_booked and referral are positive; not_now, question and wrong_person neutral; not_interested, objection, bad_fit and hostile negative; none clears the label. out_of_office reschedules the follow-up past the return date instead of treating silence as disinterest; wrong_person drives a referral ask. do_not_contact is deliberately not a member — that intent routes to POST /leads/suppress instead.\n"
    }
  }
}