{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/42min-us/json-schema/42min-us-create-booking-request-schema.json",
  "title": "CreateBookingRequest",
  "description": "Identify the event type by `event_type_id`, or by `username` plus `event_slug`.\nSupplying neither is rejected.\n",
  "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/CreateBookingRequest",
  "type": "object",
  "required": [
    "start",
    "attendee"
  ],
  "properties": {
    "event_type_id": {
      "type": "string",
      "format": "uuid"
    },
    "username": {
      "type": "string",
      "maxLength": 127
    },
    "event_slug": {
      "type": "string",
      "maxLength": 127
    },
    "start": {
      "type": "string",
      "format": "date-time"
    },
    "timezone": {
      "type": "string",
      "maxLength": 64,
      "description": "IANA timezone the attendee sees times in."
    },
    "attendee": {
      "type": "object",
      "required": [
        "email"
      ],
      "properties": {
        "email": {
          "type": "string",
          "format": "email",
          "maxLength": 254,
          "description": "Must be ASCII and deliverable. Accented local parts are rejected."
        },
        "name": {
          "type": "string",
          "maxLength": 255
        },
        "first_name": {
          "type": "string",
          "maxLength": 127
        },
        "last_name": {
          "type": "string",
          "maxLength": 127
        },
        "phone": {
          "type": "string",
          "maxLength": 64,
          "description": "International format, starting with `+`. Required when `sms_opt_in` is true."
        },
        "timezone": {
          "type": "string",
          "maxLength": 64
        },
        "sms_opt_in": {
          "type": "boolean",
          "description": "The attendee agrees to get text messages about this booking. It needs `phone`\nas a valid number in international format, starting with `+`. Without a phone\nthe request is rejected with 400 `attendee_phone_required`, and with a number\nthat is not valid with 400 `attendee_phone_invalid`. The booking then stores the\nphone in E.164 form. Workflow SMS steps text only attendees who agreed.\n"
        }
      }
    },
    "guests": {
      "type": "array",
      "description": "Additional people to copy on the invitation.",
      "items": {
        "type": "string",
        "format": "email"
      }
    },
    "metadata": {
      "type": "object",
      "description": "Arbitrary key-value data returned unchanged on reads.",
      "additionalProperties": true
    },
    "responses": {
      "type": "object",
      "description": "Answers to the event type's invitee questions, keyed by question key.",
      "additionalProperties": true
    },
    "utm_source": {
      "type": "string",
      "maxLength": 255
    },
    "utm_medium": {
      "type": "string",
      "maxLength": 255
    },
    "utm_campaign": {
      "type": "string",
      "maxLength": 255
    }
  }
}