{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://developers.youareaccountable.com/schemas/scheduled_intake.created.json",
  "title": "ScheduledIntakeCreated",
  "description": "An intake meeting is scheduled.",
  "type": "object",
  "required": [
    "event_type",
    "data"
  ],
  "properties": {
    "event_type": {
      "const": "scheduled_intake.created"
    },
    "data": {
      "type": "object",
      "required": [
        "medical_record_number",
        "scheduled_date",
        "meeting_url",
        "invitee_email",
        "meeting_id"
      ],
      "properties": {
        "medical_record_number": {
          "type": "string",
          "format": "uuid",
          "description": "The member's medical record number. Always a UUID. Use it to match the event to your own record."
        },
        "plan_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The member's Accountable plan. Can be null or left out."
        },
        "scheduled_date": {
          "type": "string",
          "format": "date-time",
          "description": "When the meeting starts."
        },
        "meeting_url": {
          "type": "string",
          "description": "The video link for the meeting. An empty string when there is none."
        },
        "invitee_email": {
          "type": "string",
          "description": "The email address of the person invited. An empty string when there is none."
        },
        "meeting_id": {
          "type": "string",
          "description": "The meeting's ID. The cancel event uses the same ID."
        }
      }
    }
  },
  "examples": [
    {
      "event_type": "scheduled_intake.created",
      "data": {
        "medical_record_number": "3f2b8c1e-7a4d-4e9b-9c55-0d6a1f2e8b47",
        "plan_name": "Standard Plan",
        "scheduled_date": "2026-01-05T16:00:00.000Z",
        "meeting_url": "https://example.zoom.us/j/1234567890",
        "invitee_email": "member@example.com",
        "meeting_id": "665f1c2ab7e4d90012a3f4c6"
      }
    }
  ]
}
