{
  "openapi": "3.1.0",
  "info": {
    "title": "MeetWho Public API",
    "version": "1.0.0",
    "description": "Programmatic access to your MeetWho account. Authenticate with the `x-meetwho-api-key` header."
  },
  "servers": [
    {
      "url": "https://meetwho.app/api/public/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-meetwho-api-key"
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/users/me": {
      "get": {
        "summary": "Get the authenticated user's profile",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/events": {
      "get": {
        "summary": "List events hosted by the caller",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "published"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/events/create": {
      "post": {
        "summary": "Create a new event",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title",
                  "start_at",
                  "end_at"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "start_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "end_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "timezone": {
                    "type": "string"
                  },
                  "location_type": {
                    "type": "string",
                    "enum": [
                      "in_person",
                      "virtual"
                    ]
                  },
                  "location_city": {
                    "type": "string"
                  },
                  "location_country": {
                    "type": "string"
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "public",
                      "private"
                    ]
                  },
                  "requires_approval": {
                    "type": "boolean"
                  },
                  "cover_image_url": {
                    "type": "string"
                  },
                  "meeting_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created"
          }
        }
      }
    },
    "/events/{id}": {
      "get": {
        "summary": "Get a single hosted event by id or slug",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/events/{id}/guests": {
      "get": {
        "summary": "List guests for a hosted event",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  }
}