{
  "openapi": "3.1.0",
  "info": {
    "title": "rehabit.at Events API",
    "version": "0.1.0",
    "description": "Read-only event data plus mentor submissions. For agent workflows prefer A2A (/a2a) or MCP (/mcp)."
  },
  "servers": [
    {
      "url": "https://rehabit.at"
    }
  ],
  "paths": {
    "/api/events": {
      "get": {
        "operationId": "listEvents",
        "summary": "Search upcoming events",
        "parameters": [
          {
            "name": "person",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Teacher id, e.g. joe-dispenza, brian-scott, bruce-lipton, gregg-braden"
            }
          },
          {
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "ISO 3166-1 alpha-2, e.g. US, MX, GB"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "maxPrice",
            "in": "query",
            "schema": {
              "type": "number",
              "description": "In the event currency"
            }
          },
          {
            "name": "maxDays",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "bookable",
            "in": "query",
            "schema": {
              "type": "boolean",
              "description": "Only events you can buy tickets for now"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Free-text match on title, venue, teacher"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Events"
          }
        }
      }
    },
    "/api/events/{id}": {
      "get": {
        "operationId": "getEvent",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Event"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/people.json": {
      "get": {
        "operationId": "listPeople",
        "responses": {
          "200": {
            "description": "Teachers, host and mentor program"
          }
        }
      }
    },
    "/api/recommend": {
      "get": {
        "operationId": "recommend",
        "parameters": [
          {
            "name": "text",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "person",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Teacher id, e.g. joe-dispenza, brian-scott, bruce-lipton, gregg-braden"
            }
          },
          {
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "ISO 3166-1 alpha-2, e.g. US, MX, GB"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "maxPrice",
            "in": "query",
            "schema": {
              "type": "number",
              "description": "In the event currency"
            }
          },
          {
            "name": "maxDays",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "bookable",
            "in": "query",
            "schema": {
              "type": "boolean",
              "description": "Only events you can buy tickets for now"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Free-text match on title, venue, teacher"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked events with reasons"
          }
        }
      }
    },
    "/api/submissions": {
      "post": {
        "operationId": "submit",
        "summary": "Mentor application or event submission (queued for human review)",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "date": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "agentCard": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Queued"
          }
        }
      }
    }
  }
}