{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fractionalteams-com/json-schema/fractionalteams-com-lead-schema.json",
  "title": "Lead",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/fractionalteams-com-api-openapi.json#/components/schemas/Lead",
  "type": "object",
  "required": [
    "conversation_id",
    "status"
  ],
  "properties": {
    "conversation_id": {
      "type": "string"
    },
    "contact_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "profile_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "owner": {
      "type": [
        "string",
        "null"
      ]
    },
    "summary": {
      "type": [
        "string",
        "null"
      ],
      "description": "Short conversation summary written for the report"
    },
    "last_message": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "at": {
          "type": "string",
          "format": "date-time"
        },
        "from": {
          "type": [
            "string",
            "null"
          ],
          "description": "Who sent the last message (the lead's name, or the salesperson)"
        },
        "text": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "last_activity_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "status": {
      "type": "string",
      "enum": [
        "awaiting",
        "replied_outside"
      ]
    },
    "status_changed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}