{
  "openapi": "3.1.0",
  "info": {
    "title": "MeetZone",
    "version": "0.2.0",
    "description": "Timezone meeting-overlap API. /mcp, docs and the homepage are public; /v1/* is served through RapidAPI (https://rapidapi.com/miketusa/api/meetzone-timezone-meeting-overlap-api) and returns 401 without the RapidAPI gateway.",
    "contact": {
      "email": "digitalpromohub.support@gmail.com"
    }
  },
  "servers": [
    {
      "url": "https://meetzone-api.mike-tusa.workers.dev"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "summary": "Homepage (HTML)",
        "responses": {
          "200": {
            "description": "HTML",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "summary": "MCP JSON-RPC (Streamable HTTP, stateless, JSON responses). Free tier, no key.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "JSON-RPC 2.0 message or batch (legacy protocol versions only; max 10, at most one tools/call)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result(s); tool errors are results with isError and _meta[\"meetzone/error\"]",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 message or batch (legacy protocol versions only; max 10, at most one tools/call)"
                }
              }
            }
          },
          "202": {
            "description": "Only notifications / client responses"
          },
          "400": {
            "description": "Parse error, invalid request, header mismatch (-32020) or unsupported version (-32022)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 message or batch (legacy protocol versions only; max 10, at most one tools/call)"
                }
              }
            }
          },
          "401": {
            "description": "An API key was sent (the MCP endpoint takes none)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 message or batch (legacy protocol versions only; max 10, at most one tools/call)"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 message or batch (legacy protocol versions only; max 10, at most one tools/call)"
                }
              }
            }
          },
          "404": {
            "description": "Method not found (2026-07-28)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 message or batch (legacy protocol versions only; max 10, at most one tools/call)"
                }
              }
            }
          },
          "413": {
            "description": "Body over 64 KB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 message or batch (legacy protocol versions only; max 10, at most one tools/call)"
                }
              }
            }
          },
          "429": {
            "description": "Too many non-tool messages",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 message or batch (legacy protocol versions only; max 10, at most one tools/call)"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "Internal error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 message or batch (legacy protocol versions only; max 10, at most one tools/call)"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 message or batch (legacy protocol versions only; max 10, at most one tools/call)"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Not supported (no SSE)",
        "responses": {
          "405": {
            "description": "Method not allowed",
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST, OPTIONS"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Not supported (no sessions)",
        "responses": {
          "405": {
            "description": "Method not allowed",
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST, OPTIONS"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "summary": "llms.txt",
        "responses": {
          "200": {
            "description": "llms.txt",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "summary": "This document",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/mcp/server-card.json": {
      "get": {
        "summary": "MCP server card",
        "responses": {
          "200": {
            "description": "Server card",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/mcp-registry-auth": {
      "get": {
        "summary": "Official MCP Registry HTTP proof (public key)",
        "responses": {
          "200": {
            "description": "v=MCPv1 record",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not configured",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/privacy": {
      "get": {
        "summary": "Privacy and acceptable use (HTML)",
        "responses": {
          "200": {
            "description": "HTML",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/health": {
      "get": {
        "security": [
          {
            "rapidApiGateway": []
          }
        ],
        "summary": "Health",
        "responses": {
          "200": {
            "description": "ok + version",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing RapidAPI gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/zones/search": {
      "get": {
        "security": [
          {
            "rapidApiGateway": []
          }
        ],
        "summary": "Search IANA zones",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
              "maxLength": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matches",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "query": {
                      "type": "string"
                    },
                    "count": {
                      "type": "number"
                    },
                    "zones": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "aliases": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "region": {
                            "type": "string"
                          },
                          "utc_offset_minutes": {
                            "type": "number"
                          },
                          "abbreviation": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "plan_note": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "count",
                    "zones"
                  ]
                }
              }
            },
            "headers": {
              "X-MeetZone-Plan-Clamped": {
                "schema": {
                  "type": "string"
                },
                "description": "Present when BASIC clamped limit"
              }
            }
          },
          "400": {
            "description": "validation_error | plan_limit_exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/overlap": {
      "post": {
        "security": [
          {
            "rapidApiGateway": []
          }
        ],
        "summary": "Ranked meeting slots across zones",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "zones": {
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 12,
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "description": "IANA zone ids, e.g. [\"America/New_York\",\"Europe/London\"]"
                  },
                  "work_hours": {
                    "type": "object",
                    "properties": {
                      "start": {
                        "type": "string",
                        "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
                        "maxLength": 5
                      },
                      "end": {
                        "type": "string",
                        "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
                        "maxLength": 5
                      }
                    },
                    "required": [
                      "start",
                      "end"
                    ],
                    "additionalProperties": false,
                    "description": "Local working window applied in each zone (default 09:00-17:00)"
                  },
                  "days": {
                    "type": "array",
                    "maxItems": 31,
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
                      "maxLength": 10
                    },
                    "description": "Dates YYYY-MM-DD (default: today + 6 days, UTC)"
                  },
                  "duration_minutes": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 480,
                    "description": "Meeting length in minutes (default 30)"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "include_ics": {
                    "type": "boolean",
                    "description": "Include an ICS VEVENT for the top slot (default true)"
                  }
                },
                "required": [
                  "zones"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Slots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "query": {
                      "type": "object",
                      "properties": {
                        "zones": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "work_hours": {
                          "type": "object",
                          "properties": {
                            "start": {
                              "type": "string"
                            },
                            "end": {
                              "type": "string"
                            }
                          }
                        },
                        "days": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "duration_minutes": {
                          "type": "number"
                        },
                        "plan_note": {
                          "type": "string"
                        }
                      }
                    },
                    "count": {
                      "type": "number"
                    },
                    "slots": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rank": {
                            "type": "number"
                          },
                          "start_utc": {
                            "type": "string"
                          },
                          "end_utc": {
                            "type": "string"
                          },
                          "duration_minutes": {
                            "type": "number"
                          },
                          "local": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "zone": {
                                  "type": "string"
                                },
                                "start_local": {
                                  "type": "string"
                                },
                                "end_local": {
                                  "type": "string"
                                },
                                "utc_offset_minutes": {
                                  "type": "number"
                                },
                                "abbreviation": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "plan_note": {
                      "type": "string"
                    },
                    "ics": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "count",
                    "slots"
                  ]
                }
              }
            },
            "headers": {
              "X-MeetZone-Plan-Clamped": {
                "schema": {
                  "type": "string"
                },
                "description": "Present when BASIC clamped limit"
              }
            }
          },
          "400": {
            "description": "validation_error | plan_limit_exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "unknown_zone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "details": {}
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "ok",
          "error"
        ]
      }
    },
    "securitySchemes": {
      "rapidApiGateway": {
        "type": "apiKey",
        "in": "header",
        "name": "X-RapidAPI-Key",
        "description": "Subscribe on RapidAPI (https://rapidapi.com/miketusa/api/meetzone-timezone-meeting-overlap-api) and call the RapidAPI host; the gateway authenticates you."
      }
    }
  }
}