{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/classquill-com/json-schema/classquill-com-student-create-schema.json",
  "title": "StudentCreate",
  "description": "POST /v1/students → mint a student account with a known name + fields, place them, and\noptionally create + link a parent. Requires scope `accounts:write`.\n\n`email` is OPTIONAL: omit it to create the account now (against an internal placeholder\naddress) and add a real email + invite later. `send_invite` (default true) controls whether\na set-password email is sent when a real email is present — a no-email account is never\nemailed regardless.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/classquill-com-students-parents-api-openapi.yml#/components/schemas/StudentCreate",
  "properties": {
    "full_name": {
      "type": "string",
      "title": "Full Name"
    },
    "email": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email"
    },
    "send_invite": {
      "type": "boolean",
      "title": "Send Invite",
      "default": true
    },
    "phone_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Phone Number"
    },
    "phone_country_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Phone Country Code"
    },
    "math_level_ids": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Math Level Ids"
    },
    "addresses": {
      "items": {
        "$ref": "#/$defs/AddressIn"
      },
      "type": "array",
      "title": "Addresses"
    },
    "placement": {
      "anyOf": [
        {
          "$ref": "#/$defs/PlacementIn"
        },
        {
          "type": "null"
        }
      ]
    },
    "parent": {
      "anyOf": [
        {
          "$ref": "#/$defs/ParentIn"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "full_name"
  ],
  "$defs": {
    "AddressIn": {
      "properties": {
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Label"
        },
        "street_address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Street Address"
        },
        "suburb": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Suburb"
        },
        "state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "State"
        },
        "postcode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Postcode"
        },
        "is_default": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Is Default"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "AddressIn",
      "description": "A student address (locations row). Multiple allowed; at most one is_default."
    },
    "ParentIn": {
      "properties": {
        "full_name": {
          "type": "string",
          "title": "Full Name"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Email"
        },
        "phone_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Phone Number"
        },
        "phone_country_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Phone Country Code"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "full_name"
      ],
      "title": "ParentIn",
      "description": "A parent to create + link to the student being created (nested in StudentCreate).\n`email` is optional — omit it to mint a no-email (placeholder) parent account."
    },
    "PlacementIn": {
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "add_to_org",
            "add_to_1on1",
            "add_to_classroom",
            "add_to_group"
          ],
          "title": "Type",
          "default": "add_to_org"
        },
        "tutor_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tutor Id"
        },
        "classroom_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Classroom Id"
        },
        "group_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Group Id"
        },
        "active_math_level_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Active Math Level Id"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "PlacementIn",
      "description": "Where to place a created student. Targets are org-scoped (cross-org → 404)."
    }
  }
}