{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whenmeet-me/json-schema/whenmeet-me-event-type-input-schema.json",
  "title": "EventTypeInput",
  "description": "Link type settings. Only title is needed to create one; everything else has a sensible default.",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/whenmeet-me-api-openapi.json#/components/schemas/EventTypeInput",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "slug": {
      "type": "string",
      "description": "Default: from the title (-2, -3 … appended if taken)."
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 2000
    },
    "durationMin": {
      "type": "integer",
      "minimum": 5,
      "maximum": 480,
      "multipleOf": 5,
      "default": 30
    },
    "conference": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "meet",
        "teams",
        null
      ],
      "description": "Default: meet for a Google calendar, teams for Microsoft."
    },
    "bufferBeforeMin": {
      "type": "integer",
      "minimum": 0,
      "maximum": 240,
      "default": 0
    },
    "bufferAfterMin": {
      "type": "integer",
      "minimum": 0,
      "maximum": 240,
      "default": 0
    },
    "minNoticeMin": {
      "type": "integer",
      "minimum": 0,
      "maximum": 43200,
      "default": 240
    },
    "maxDaysAhead": {
      "type": "integer",
      "minimum": 1,
      "maximum": 60,
      "default": 60
    },
    "slotStepMin": {
      "type": "integer",
      "enum": [
        5,
        10,
        15,
        20,
        30,
        45,
        60,
        90,
        120
      ],
      "default": 30
    },
    "dailyLimit": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "maximum": 50,
      "default": null
    },
    "questions": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "$ref": "#/$defs/BookingQuestion"
      },
      "description": "Name and email are always collected."
    },
    "weeklyHours": {
      "anyOf": [
        {
          "$ref": "#/$defs/WeeklyHours"
        },
        {
          "type": "null"
        }
      ],
      "description": "Personal links only. Set with hoursTimezone to override this link’s weekly hours; null follows the booking profile. Team links reject an override (invalid_weekly_hours)."
    },
    "hoursTimezone": {
      "type": [
        "string",
        "null"
      ],
      "description": "IANA timezone for weeklyHours. A non-null weeklyHours needs a valid non-null zone; clear both to follow the profile (invalid_hours_timezone on a mismatched pair)."
    },
    "reminders": {
      "type": "array",
      "items": {
        "type": "integer",
        "enum": [
          15,
          30,
          60,
          120,
          240,
          1440,
          2880
        ]
      },
      "maxItems": 3,
      "default": [
        1440,
        60
      ],
      "description": "Reminder emails to the invitee and guests, in minutes before the start (24 h and 1 h by default). Any 3 of the allowed values; duplicates collapse, stored sorted descending. [] turns reminders off; null resets to the default. Error: invalid_reminders."
    },
    "active": {
      "type": "boolean",
      "default": true
    },
    "team": {
      "anyOf": [
        {
          "$ref": "#/$defs/TeamSettings"
        },
        {
          "type": "null"
        }
      ]
    },
    "teamHandle": {
      "type": [
        "string",
        "null"
      ],
      "description": "Team links only: the link’s own public address, whenmeet.me/@<teamHandle> (same rules as nicknames and the same namespace; a leading @ and upper case are forgiven). null or \"\" releases it; turning the link personal releases it too. Errors: invalid_team_handle (bad handle, or the link is / becomes personal), 409 handle_taken (held by any nickname — yours included — or another link; nothing changes), 400 too_many_team_handles (you already hold 5 team handles on other links; nothing changes)."
    },
    "teamName": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 80,
      "description": "Shown with the team handle (\"Acme Sales\"); null → the link title. Stored only next to a team handle (ignored without one). Error: invalid_team_name."
    }
  },
  "$defs": {
    "BookingQuestion": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z0-9_]{1,32}$"
        },
        "label": {
          "type": "string",
          "maxLength": 200
        },
        "type": {
          "type": "string",
          "enum": [
            "text",
            "textarea"
          ]
        },
        "required": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "label",
        "type",
        "required"
      ]
    },
    "TeamSettings": {
      "type": "object",
      "description": "Turns a link into a TEAM link. mode \"all\" = every member must be free (e.g. a two-person interview panel); \"any\" = whoever is free, assigned in turn (round-robin). Members get an email invite and join with one calendar connect.",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "all",
            "any"
          ]
        },
        "members": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "email"
          },
          "maxItems": 10,
          "description": "Colleagues to invite (you excluded)."
        },
        "includeMe": {
          "type": "boolean",
          "description": "In all mode you attend with the team; in any mode you join the round-robin pool so one available person (you or a teammate) receives the booking. Default true."
        }
      },
      "required": [
        "mode"
      ]
    },
    "WeeklyHours": {
      "type": "object",
      "description": "Working hours per weekday in the profile timezone, or in hoursTimezone for a personal link override: up to 6 [\"HH:MM\",\"HH:MM\"] intervals per day (\"24:00\" allowed as an end). Missing days mean no hours; overlapping intervals merge. Profile default Mon–Fri 09:00–17:00.",
      "properties": {
        "mon": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "tue": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "wed": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "thu": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "fri": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "sat": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "minItems": 2,
            "maxItems": 2
          }
        },
        "sun": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{2}:\\d{2}$"
            },
            "minItems": 2,
            "maxItems": 2
          }
        }
      }
    }
  }
}