{"openapi":"3.0.3","info":{"title":"CRM Lead Hygiene API","version":"1.0.0","description":"Deterministic contact normalization, SHA-256 fingerprints and conservative duplicate candidates. No enrichment or deliverability checks. Request body: 32 KiB maximum. Batch: 1–20 contacts. 60 requests/minute per subscriber per edge location. Subscribe through RapidAPI when available; direct origin endpoints are gateway-only. Prelaunch returns 503."},"servers":[{"url":"https://rent-crm-lead-hygiene.farshaikh17.workers.dev","description":"Origin: proxy-only POST routes; public demo/docs. Replace with assigned RapidAPI host for customer calls."}],"components":{"securitySchemes":{"RapidAPIKey":{"type":"apiKey","in":"header","name":"X-RapidAPI-Key","description":"Customer key for the RapidAPI gateway, not the origin."}},"schemas":{"Contact":{"type":"object","description":"Known fields are optional strings or null. Unknown fields are preserved in original and warned, never normalized. Names retain case. Country is ISO alpha-2.","properties":{"name":{"type":"string","nullable":true,"maxLength":2048},"first_name":{"type":"string","nullable":true,"maxLength":2048},"last_name":{"type":"string","nullable":true,"maxLength":2048},"email":{"type":"string","nullable":true,"maxLength":2048},"phone":{"type":"string","nullable":true,"maxLength":2048},"country":{"type":"string","nullable":true,"maxLength":2048},"website":{"type":"string","nullable":true,"maxLength":2048},"domain":{"type":"string","nullable":true,"maxLength":2048},"company":{"type":"string","nullable":true,"maxLength":2048},"linkedin_url":{"type":"string","nullable":true,"maxLength":2048},"social_urls":{"type":"array","nullable":true,"maxItems":10,"items":{"type":"string","maxLength":2048}}},"additionalProperties":true},"NormalizedContact":{"type":"object","required":["original","normalized","validity","derived","warnings","changes"],"properties":{"original":{"$ref":"#/components/schemas/Contact"},"normalized":{"type":"object","additionalProperties":true},"validity":{"type":"object","description":"Per field true/false/null; social_urls is an array. Null means absent/empty, not verified.","additionalProperties":true},"derived":{"type":"object","additionalProperties":true},"warnings":{"type":"array","items":{"type":"object","required":["field","code","message"],"properties":{"field":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}}},"changes":{"type":"array","items":{"type":"object","required":["field","operation"],"properties":{"field":{"type":"string"},"operation":{"type":"string"}}}}}},"FingerprintResult":{"type":"object","required":["fingerprint_version","algorithm","fingerprints","weak_keys","contact"],"properties":{"fingerprint_version":{"type":"string","enum":["v1"]},"algorithm":{"type":"string","enum":["SHA-256"]},"fingerprints":{"type":"object","additionalProperties":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"weak_keys":{"type":"array","items":{"type":"string"}},"contact":{"$ref":"#/components/schemas/NormalizedContact"}}},"DedupeResult":{"type":"object","required":["records","duplicates","summary","auto_merged"],"properties":{"records":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/NormalizedContact"},{"type":"object","properties":{"index":{"type":"integer"}}}]}},"duplicates":{"type":"array","items":{"type":"object","required":["indices","confidence","confidence_kind","reasons","conflicts","action"],"properties":{"indices":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"integer","minimum":0}},"confidence":{"type":"number","minimum":0,"maximum":1},"confidence_kind":{"type":"string","enum":["heuristic_not_probability"]},"reasons":{"type":"array","items":{"type":"string"}},"conflicts":{"type":"array","items":{"type":"string"}},"action":{"type":"string","enum":["review"]}}}},"summary":{"type":"object","properties":{"input_contacts":{"type":"integer"},"candidate_pairs":{"type":"integer"}}},"auto_merged":{"type":"boolean","enum":[false]}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","details"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"paths":{"/v1/contact/normalize":{"post":{"summary":"Normalize a contact","operationId":"normalizeContact","security":[{"RapidAPIKey":[]}],"parameters":[{"name":"X-RapidAPI-Host","in":"header","required":true,"schema":{"type":"string"},"description":"Assigned host from marketplace listing."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"},"example":{"name":"  ANA   María  ","email":"ana@example.COM ","phone":"020 7946 0018","country":"gb","website":"Example.com/?utm_source=crm"}}}},"responses":{"200":{"description":"Deterministic result. Warnings need review.","content":{"application/json":{"schema":{"type":"object","required":["version","result"],"properties":{"version":{"type":"string"},"result":{"$ref":"#/components/schemas/NormalizedContact"}}}}}},"400":{"description":"Malformed JSON or UTF-8","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid gateway authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body exceeds 32768 bytes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Unsupported content type or encoding","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid field types, lengths, country format or batch size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; Retry-After: 60","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected processing failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Prelaunch or temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/contact/fingerprint":{"post":{"summary":"Generate stable contact fingerprints","operationId":"fingerprintContact","security":[{"RapidAPIKey":[]}],"parameters":[{"name":"X-RapidAPI-Host","in":"header","required":true,"schema":{"type":"string"},"description":"Assigned host from marketplace listing."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"},"example":{"name":"  ANA   María  ","email":"ana@example.COM ","phone":"020 7946 0018","country":"gb","website":"Example.com/?utm_source=crm"}}}},"responses":{"200":{"description":"Deterministic result. Warnings need review.","content":{"application/json":{"schema":{"type":"object","required":["version","result"],"properties":{"version":{"type":"string"},"result":{"$ref":"#/components/schemas/FingerprintResult"}}}}}},"400":{"description":"Malformed JSON or UTF-8","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid gateway authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body exceeds 32768 bytes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Unsupported content type or encoding","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid field types, lengths, country format or batch size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; Retry-After: 60","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected processing failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Prelaunch or temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/contacts/dedupe":{"post":{"summary":"Find conservative duplicate candidates in a batch","operationId":"deduplicateContacts","security":[{"RapidAPIKey":[]}],"parameters":[{"name":"X-RapidAPI-Host","in":"header","required":true,"schema":{"type":"string"},"description":"Assigned host from marketplace listing."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contacts"],"additionalProperties":false,"properties":{"contacts":{"type":"array","minItems":1,"maxItems":20,"items":{"$ref":"#/components/schemas/Contact"}}}},"example":{"contacts":[{"name":"  ANA   María  ","email":"ana@example.COM ","phone":"020 7946 0018","country":"gb","website":"Example.com/?utm_source=crm"},{"email":"ana@example.com"}]}}}},"responses":{"200":{"description":"Deterministic result. Warnings need review.","content":{"application/json":{"schema":{"type":"object","required":["version","result"],"properties":{"version":{"type":"string"},"result":{"$ref":"#/components/schemas/DedupeResult"}}}}}},"400":{"description":"Malformed JSON or UTF-8","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid gateway authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request body timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body exceeds 32768 bytes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Unsupported content type or encoding","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid field types, lengths, country format or batch size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; Retry-After: 60","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected processing failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Prelaunch or temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/health":{"get":{"summary":"Health and commercial activation status","security":[],"responses":{"200":{"description":"Health and commercial activation status","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1":{"get":{"summary":"Version and limits","security":[],"responses":{"200":{"description":"Version and limits","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/demo":{"get":{"summary":"Fixed synthetic example; does not process submitted contacts","security":[],"responses":{"200":{"description":"Fixed synthetic example; does not process submitted contacts","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}}}}