{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentbookable-com/json-schema/agentbookable-com-booking-create-schema.json",
  "title": "BookingCreate",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentbookable-com-openapi.json#/components/schemas/BookingCreate",
  "type": "object",
  "required": [
    "businessId",
    "serviceId",
    "customer",
    "mandateRef"
  ],
  "properties": {
    "businessId": {
      "type": "string"
    },
    "serviceId": {
      "type": "string"
    },
    "slotId": {
      "type": "string",
      "description": "Slot id from the availability call (preferred)"
    },
    "slot": {
      "type": "object",
      "description": "Explicit slot when you do not have a slotId",
      "properties": {
        "start": {
          "type": "string"
        },
        "end": {
          "type": "string"
        },
        "staffId": {
          "type": "string"
        }
      }
    },
    "customer": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "phone": {
          "type": "string",
          "description": "Required when the service's bookingRequirements.phone is 'required'"
        },
        "locale": {
          "type": "string"
        },
        "timezone": {
          "type": "string"
        }
      }
    },
    "mandateRef": {
      "type": "string",
      "description": "From POST /mandates — single-use, expires in 15 minutes"
    },
    "idempotencyKey": {
      "type": "string",
      "description": "Stable key for safe retries"
    },
    "draftId": {
      "type": "string",
      "description": "The consented draft (from POST /booking-drafts + POST /mandates/for-draft). Request must match the draft exactly."
    }
  }
}