{"openapi":"3.1.0","info":{"title":"LeadProof API","version":"1.1.0","description":"Evaluate LeadProof fit, test lead normalization, and deliver leads with retries, verification receipts, and fingerprint-verified failed-event replay."},"servers":[{"url":"https://leadproof.jessesay.chatgpt.site/api"}],"paths":{"/agent/audit":{"post":{"summary":"Audit a lead-delivery workflow","description":"Returns a 0-100 reliability risk score, missing safeguards, transparent revenue-at-risk estimate, integration kit, plan recommendation, and authorized checkout path.","operationId":"auditLeadWorkflow","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditInput"}}}},"responses":{"200":{"description":"Explainable reliability audit and integration kit"}},"x-human-or-principal-authorization-required":true}},"/agent/evaluate":{"post":{"summary":"Evaluate whether LeadProof fits a lead-delivery workflow","description":"Returns transparent assumptions, a plan recommendation, integration guidance, and official checkout for an authorized purchaser.","operationId":"evaluateLeadProofFit","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FitInput"}}}},"responses":{"200":{"description":"Fit assessment and authorized checkout handoff"}},"x-human-or-principal-authorization-required":true}},"/agent/handoff":{"post":{"summary":"Request a consent-based LeadProof sales handoff","description":"Stores a qualified buyer request only after the represented buyer explicitly authorizes contact. Returns the recommended plan and official checkout; it never authorizes payment.","operationId":"requestLeadProofHandoff","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffInput"}}}},"responses":{"201":{"description":"Authorized handoff received"},"422":{"description":"Missing buyer identity, email, or contact consent"}},"x-human-or-principal-authorization-required":true}},"/v1/sandbox":{"post":{"summary":"Test lead normalization and a simulated verified delivery","operationId":"testLead","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}},"responses":{"201":{"description":"Lead normalized and sandbox delivery verified"}}}},"/v1/leads":{"post":{"summary":"Normalize and deliver a lead to an HTTPS webhook","description":"Use a stable Idempotency-Key for every source event. A failed event can be retried by resubmitting the identical body and destination with the original Idempotency-Key and X-LeadProof-Replay: true. A mismatched fingerprint is rejected without delivery.","operationId":"deliverLead","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"X-LeadProof-Replay","in":"header","required":false,"description":"Set to true only when explicitly retrying a previously failed event with the identical original body and destination.","schema":{"type":"boolean","default":false}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Lead"},{"type":"object","required":["destination"],"properties":{"destination":{"type":"string","format":"uri"},"data":{"type":"object","additionalProperties":true}}}]}}}},"responses":{"201":{"description":"Lead delivered and verified"},"401":{"description":"Invalid API key"},"409":{"description":"Idempotency conflict, concurrent event processing, or replay fingerprint mismatch"},"502":{"description":"Destination could not be verified after retries"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"AuditInput":{"allOf":[{"$ref":"#/components/schemas/FitInput"},{"type":"object","properties":{"retry_policy":{"type":"boolean"},"idempotency":{"type":"boolean"},"destination_verification":{"type":"boolean"},"failure_alerts":{"type":"boolean"},"dead_letter_queue":{"type":"boolean"}}}]},"FitInput":{"type":"object","properties":{"stack":{"type":"string","examples":["GoHighLevel + Make"]},"monthly_leads":{"type":"integer","minimum":0},"average_customer_value":{"type":"number","minimum":0},"workflow_problem":{"type":"string"}}},"HandoffInput":{"type":"object","required":["name","email","consent_to_contact"],"properties":{"name":{"type":"string","description":"Name of the represented buyer"},"email":{"type":"string","format":"email","description":"Business email authorized for follow-up"},"company":{"type":"string"},"stack":{"type":"string"},"monthly_leads":{"type":"integer","minimum":0},"average_customer_value":{"type":"number","minimum":0},"plan":{"type":"string","enum":["builder","agency"]},"consent_to_contact":{"type":"boolean","const":true,"description":"True only after the represented buyer authorizes LeadProof contact"}}},"Lead":{"type":"object","required":["name","email"],"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"source":{"type":"string"}}}}}}