{
  "openapi": "3.1.0",
  "info": {
    "title": "Citiwell Appointment Lead API",
    "version": "2026-06-30",
    "description": "Public endpoint for user-consented Citiwell laser hair removal appointment requests. The endpoint creates a lead request only; Citiwell confirms the exact appointment time with the client."
  },
  "servers": [
    {
      "url": "https://citiwell.me"
    }
  ],
  "paths": {
    "/send_lead.php": {
      "get": {
        "operationId": "describeCitiwellLeadEndpoint",
        "summary": "Describe the Citiwell lead endpoint",
        "responses": {
          "200": {
            "description": "Endpoint documentation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "requestCitiwellAppointment",
        "summary": "Request a Citiwell laser hair removal appointment",
        "description": "Submit a user-consented lead request. This does not confirm an appointment slot.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "phone",
                  "messenger",
                  "gender"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Client name."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Client phone number in international or local format."
                  },
                  "messenger": {
                    "type": "string",
                    "enum": [
                      "WhatsApp",
                      "Viber"
                    ],
                    "description": "Preferred messenger for Citiwell response."
                  },
                  "gender": {
                    "type": "string",
                    "enum": [
                      "female",
                      "male"
                    ],
                    "description": "Gender selection used by the site form."
                  },
                  "city": {
                    "type": "string",
                    "description": "Preferred city or Citiwell location."
                  },
                  "country": {
                    "type": "string",
                    "description": "Client country."
                  },
                  "lang": {
                    "type": "string",
                    "description": "Preferred language, for example sr-ME, ru, or en."
                  },
                  "page_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Page that produced the request."
                  },
                  "referrer": {
                    "type": "string",
                    "description": "Referrer or AI assistant source."
                  },
                  "message": {
                    "type": "string",
                    "description": "Optional client note, preferred zone, or preferred time."
                  },
                  "utm": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "tracking": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": true
              },
              "examples": {
                "appointmentRequest": {
                  "summary": "Appointment lead request",
                  "value": {
                    "name": "Example Client",
                    "phone": "+38268123456",
                    "messenger": "WhatsApp",
                    "gender": "female",
                    "city": "Podgorica",
                    "country": "Montenegro",
                    "lang": "en",
                    "page_url": "https://citiwell.me/index-en.html",
                    "referrer": "AI chat",
                    "message": "I want laser hair removal. Preferred area: armpits."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Lead request accepted by the website endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "500": {
            "description": "Endpoint not configured"
          },
          "502": {
            "description": "Delivery to Citiwell failed"
          }
        }
      },
      "options": {
        "operationId": "optionsCitiwellLeadEndpoint",
        "summary": "CORS preflight",
        "responses": {
          "200": {
            "description": "CORS response"
          }
        }
      }
    }
  }
}
