{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/42min-us/json-schema/42min-us-create-series-request-schema.json",
  "title": "CreateSeriesRequest",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/42min-us-api-openapi.yml#/components/schemas/CreateSeriesRequest",
  "type": "object",
  "required": [
    "host_user_id",
    "attendee",
    "frequency",
    "time",
    "starts_on",
    "count"
  ],
  "properties": {
    "host_user_id": {
      "type": "string",
      "format": "uuid",
      "description": "Whose calendar the series is booked on. Must be someone you may act for."
    },
    "event_type_id": {
      "type": "string",
      "format": "uuid",
      "description": "Required unless `username` and `event_slug` are both given."
    },
    "username": {
      "type": "string"
    },
    "event_slug": {
      "type": "string"
    },
    "attendee": {
      "type": "object",
      "required": [
        "email"
      ],
      "properties": {
        "email": {
          "type": "string",
          "format": "email"
        },
        "name": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        }
      }
    },
    "frequency": {
      "type": "string",
      "enum": [
        "weekly",
        "monthly_same_day"
      ]
    },
    "interval_weeks": {
      "type": "integer",
      "minimum": 1,
      "maximum": 8,
      "default": 1,
      "description": "Weeks between repeats. Weekly patterns only."
    },
    "weekdays": {
      "type": "array",
      "maxItems": 7,
      "description": "Required for a weekly pattern.",
      "items": {
        "type": "string",
        "enum": [
          "sun",
          "mon",
          "tue",
          "wed",
          "thu",
          "fri",
          "sat"
        ]
      }
    },
    "time": {
      "type": "string",
      "pattern": "^\\d{2}:\\d{2}$",
      "description": "Wall clock in `timezone`, `HH:MM` on a 24-hour clock."
    },
    "timezone": {
      "type": "string",
      "description": "IANA zone. Defaults to the host user's own zone."
    },
    "starts_on": {
      "type": "string",
      "format": "date",
      "description": "The first civil day the pattern is walked from. Past instants are never booked."
    },
    "count": {
      "type": "integer",
      "minimum": 1,
      "maximum": 42,
      "description": "Occurrences to book. Dates that are not free are skipped, not shifted."
    },
    "location_url": {
      "type": "string",
      "description": "A fixed http(s) link every occurrence carries instead of a generated conference."
    },
    "notify_invitee": {
      "type": "boolean",
      "default": true,
      "description": "When false the attendee gets no mail for this series."
    }
  }
}