{
  "openapi": "3.1.0",
  "info": {
    "title": "GetAccidentLawyerNow lead intake",
    "version": "1.0.0",
    "description": "Public case-review intake for a matching/referral site. Not a law firm. Not legal advice. TCPA consent required.",
    "contact": {
      "name": "GetAccidentLawyerNow",
      "url": "https://www.getaccidentlawyernow.com"
    }
  },
  "servers": [
    {
      "url": "https://www.getaccidentlawyernow.com"
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "summary": "Liveness",
        "operationId": "health",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/leads": {
      "post": {
        "summary": "Submit a case-review request",
        "operationId": "createLead",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Lead"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted"
          },
          "400": {
            "description": "Validation error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Lead": {
        "type": "object",
        "required": [
          "consent"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "zip": {
            "type": "string"
          },
          "consent": {
            "type": "boolean",
            "description": "TCPA consent; must be true"
          },
          "incidentType": {
            "type": "string"
          },
          "injuryLevel": {
            "type": "string"
          },
          "treatmentStatus": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      }
    }
  }
}
