{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coldrig-dev/json-schema/coldrig-dev-lead-input-schema.json",
  "title": "LeadInput",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coldrig-dev-openapi.yml#/components/schemas/LeadInput",
  "type": "object",
  "required": [
    "email"
  ],
  "properties": {
    "email": {
      "type": "string",
      "format": "email",
      "description": "Trimmed and lower-cased before it is checked or stored."
    },
    "firstName": {
      "type": "string",
      "maxLength": 200,
      "default": "",
      "description": "Optional. A launch whose subject or body uses {{firstName}} is refused 400, naming how many contacts have none; no fallback word is invented. One line of plain text: a line break, tab or control character is refused (400) naming this field. Right-to-left text and its direction marks are accepted."
    },
    "company": {
      "type": "string",
      "maxLength": 200,
      "default": "",
      "description": "One line of plain text: a line break, tab or control character is refused (400) naming this field. Right-to-left text and its direction marks are accepted."
    },
    "vars": {
      "type": "object",
      "maxProperties": 50,
      "additionalProperties": {
        "type": "string",
        "maxLength": 2000
      },
      "description": "Optional per-lead values for your own {{key}} tokens: word-keys (letters, digits, underscore; up to 64 characters) to one-line plain-text strings (no line breaks, tabs or control characters). Right-to-left text and its direction marks are accepted. A {{key}} used in any subject or body must be present and non-empty on EVERY lead, or the launch is refused 400 naming the token and how many leads lack it. A key may not be firstName or company. A value is inserted once as plain text; a value that itself contains {{...}} reaches the recipient as that literal text.\n"
    },
    "attributes": {
      "$ref": "#/$defs/LeadAttributes"
    }
  },
  "$defs": {
    "LeadAttributes": {
      "type": "object",
      "additionalProperties": false,
      "description": "Optional audience details for this contact. Recorded for your account only, so results can be broken down by audience; never shared. A missing field reads \"unknown\".\n",
      "properties": {
        "role": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120,
          "description": "One line, e.g. \"Head of RevOps\"."
        },
        "seniority": {
          "type": "string",
          "enum": [
            "c_level",
            "vp",
            "director",
            "manager",
            "individual",
            "founder",
            "other"
          ]
        },
        "industry": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "companySize": {
          "type": "string",
          "enum": [
            "1-10",
            "11-50",
            "51-200",
            "201-1000",
            "1001-5000",
            "5001+"
          ]
        },
        "trigger": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120,
          "description": "Why now, e.g. \"raised a Series A\"."
        },
        "timezone": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "description": "IANA time zone, e.g. \"America/Chicago\"; refused 400 otherwise. The local send hour is recorded in it (the campaign's zone otherwise)."
        }
      }
    }
  }
}