{
  "openapi": "3.1.0",
  "info": {
    "title": "Meet Denis Smirnov \u2014 agent handoff",
    "version": "1.0.0",
    "description": "Read openings and prepare a private, 30-minute confirmation link. A human must review and submit the booking with CAPTCHA. Drafts never reserve a slot or create a meeting."
  },
  "servers": [
    {
      "url": "https://densmirnov.com/meet"
    }
  ],
  "paths": {
    "/api/config": {
      "get": {
        "operationId": "getBookingSettings",
        "summary": "Read scheduling settings",
        "responses": {
          "200": {
            "description": "Settings; ready=false means booking is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ready": {
                      "type": "boolean"
                    },
                    "duration": {
                      "type": "integer"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "noticeHours": {
                      "type": "number"
                    },
                    "horizonDays": {
                      "type": "number"
                    },
                    "buffer": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/slots": {
      "get": {
        "operationId": "getAvailableMeetingSlots",
        "summary": "Read actual openings; this does not reserve time",
        "responses": {
          "200": {
            "description": "Current free slots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "slots"
                  ],
                  "properties": {
                    "slots": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "start",
                          "end"
                        ],
                        "properties": {
                          "start": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "end": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Hourly rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/drafts": {
      "post": {
        "operationId": "prepareMeetingForHumanConfirmation",
        "summary": "Prepare a booking; human confirmation is required",
        "description": "Use user-approved details and an exact returned slot. No API key or CAPTCHA required to prepare. Never report this as booked. Repeated calls create independent unreserved drafts. The private confirmation link expires in 30 minutes.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DraftInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Prepared, NOT booked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "expiresAt",
                    "confirmationUrl"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "requires_confirmation"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "confirmationUrl": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request origin not permitted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Time is outside the current scheduling window",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "JSON required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Hourly rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "DraftInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "start",
          "name",
          "email",
          "topic",
          "timezone"
        ],
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time",
            "description": "Exact UTC timestamp from slots with milliseconds and Z."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "topic": {
            "type": "string",
            "minLength": 1,
            "maxLength": 150
          },
          "notes": {
            "type": "string",
            "maxLength": 2000,
            "default": ""
          },
          "timezone": {
            "type": "string",
            "maxLength": 100,
            "description": "Guest IANA timezone."
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
