{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/classquill-com/json-schema/classquill-com-lead-create-schema.json",
  "title": "LeadCreate",
  "description": "POST /v1/leads — capture an inbound lead into the key's org (e.g. a website quote\nfunnel). name/phone/subject are stored in the lead's free-form `payload`; email,\nsource_url, notes and a source_form_name snapshot are columns. organization_id,\nform_id, status and timestamps are server-set, never accepted; status starts 'new'.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/classquill-com-bookings-api-openapi.yml#/components/schemas/LeadCreate",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "title": "Name",
      "description": "Lead's full name."
    },
    "email": {
      "type": "string",
      "title": "Email",
      "description": "Lead's email address (required)."
    },
    "phone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Phone"
    },
    "subject": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Subject",
      "description": "Subject of interest, e.g. 'Methods'."
    },
    "audience": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "student",
            "tutor",
            "parent"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Audience",
      "description": "Who this lead is: 'student' (enrolment, the default), 'tutor' (recruitment), or 'parent' (enrolment, on behalf of a student). Omit to use the org_leads column default ('student')."
    },
    "source_form_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Form Name",
      "description": "Where the lead came from, e.g. 'website quote funnel'."
    },
    "source_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Url"
    },
    "notes": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Notes"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "name",
    "email"
  ]
}