{"openapi":"3.1.0","info":{"title":"AvalKYC API","version":"1.0.0","description":"Create and retrieve identity verifications. Authenticate with an API key (Settings → API keys). Test keys (sk_test_…) operate on isolated test data."},"servers":[{"url":"https://avalkyc.com/api/v1","description":"Production"}],"security":[{"bearerAuth":[]}],"paths":{"/verifications":{"post":{"summary":"Create a verification","operationId":"createVerification","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVerification"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}},"get":{"summary":"List verifications","operationId":"listVerifications","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Verification"}},"has_more":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/verifications/{id}":{"get":{"summary":"Retrieve a verification","operationId":"getVerification","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/verifications/{id}/duplicates":{"get":{"summary":"List duplicate/fraud flags for a verification","operationId":"listVerificationDuplicates","description":"Returns flags linking this verification to others in your history (same face or document number under a different name).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DuplicateFlag"}},"has_more":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/reverify":{"post":{"summary":"Instant re-verification (reusable identity)","operationId":"reverify","description":"Re-verify a returning applicant with just a selfie + their reusable identity token. Runs a live face match against the stored embedding, liveness, and a fresh AML screen — no document re-capture. Returns a new verification.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReverifyRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotFound"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/business":{"post":{"summary":"Run a business (KYB) check","operationId":"createBusinessVerification","description":"Resolves a company in the global LEI register (GLEIF), screens the entity, owners, and officers against sanctions & PEP lists, and returns a risk decision. Runs synchronously.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBusinessVerification"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessVerification"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"get":{"summary":"List business checks","operationId":"listBusinessVerifications","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BusinessVerification"}},"has_more":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/business/{id}":{"get":{"summary":"Retrieve a business check","operationId":"getBusinessVerification","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessVerification"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/address-checks":{"post":{"summary":"Run a proof-of-address check","operationId":"createAddressCheck","description":"OCRs an uploaded proof-of-address document (utility bill, bank statement, government letter), extracts the postal address and date, checks recency, and matches the declared name. Runs synchronously.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAddressCheck"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressCheck"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"get":{"summary":"List address checks","operationId":"listAddressChecks","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AddressCheck"}},"has_more":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/address-checks/{id}":{"get":{"summary":"Retrieve an address check","operationId":"getAddressCheck","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressCheck"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/nfc-verify":{"post":{"summary":"ePassport NFC Passive Authentication","operationId":"nfcVerify","description":"Verify the cryptographic authenticity of an ePassport chip (ICAO 9303 Passive Authentication). The chip is read by a native mobile SDK (iOS CoreNFC / Android NFC); post the SOD + data groups here. Each scan is recorded as an org-scoped NFC verification.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfcVerifyRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NfcResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"get":{"summary":"List NFC ePassport scans","operationId":"listNfcVerifications","description":"List recorded NFC Passive-Authentication scans for the key's mode.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/transactions":{"post":{"summary":"Screen a transaction (AML)","operationId":"screenTransaction","description":"Risk-score a single fiat or crypto transaction against amount thresholds, structuring, FATF high-risk jurisdictions, a sanctioned/PEP counterparty, and a sanctioned crypto wallet.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"number"},"currency":{"type":"string","example":"USD"},"direction":{"type":"string","enum":["inbound","outbound"]},"asset_type":{"type":"string","enum":["fiat","crypto"]},"counterparty_name":{"type":"string"},"counterparty_country":{"type":"string","example":"IR"},"wallet_address":{"type":"string"},"customer_ref":{"type":"string"}}}}}},"responses":{"201":{"description":"Screened","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionCheck"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"get":{"summary":"List transaction & wallet checks","operationId":"listTransactionChecks","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TransactionCheck"}},"has_more":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/wallet-screen":{"post":{"summary":"Screen a crypto wallet (KYT)","operationId":"screenWallet","description":"Screen a crypto wallet address against OFAC-published sanctioned digital-currency addresses, with basic address validation.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address"],"properties":{"address":{"type":"string","example":"0x8589…"},"asset":{"type":"string","example":"ETH"},"customer_ref":{"type":"string"}}}}}},"responses":{"201":{"description":"Screened","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionCheck"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/questionnaires":{"get":{"summary":"List AML questionnaire templates","operationId":"listQuestionnaires","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/QuestionnaireTemplate"}},"has_more":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/questionnaires/{key}":{"get":{"summary":"Retrieve a questionnaire template","operationId":"getQuestionnaire","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireTemplate"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"summary":"Submit & score a questionnaire","operationId":"submitQuestionnaire","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["answers"],"properties":{"answers":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of questionId → selected optionValue."},"subject_ref":{"type":"string"}}}}}},"responses":{"201":{"description":"Scored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnaireResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/face-search":{"post":{"summary":"1:N face search","operationId":"faceSearch","description":"Search the organization's enrolled face signatures for the closest matches to a selfie or a precomputed embedding — duplicate-account and fraud-ring detection. Provide either 'selfie' (an image) or 'embedding'.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"selfie":{"type":"string","description":"Base64 or data-URL selfie image."},"embedding":{"type":"array","items":{"type":"number"},"description":"Precomputed ArcFace embedding (alternative to 'selfie')."},"threshold":{"type":"number","default":0.3,"description":"Minimum cosine similarity to return."},"limit":{"type":"integer","default":10,"maximum":50}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaceSearchResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/active-liveness":{"post":{"summary":"Active (challenge-response) liveness","operationId":"activeLiveness","description":"Verify a burst of selfie frames against a motion challenge (e.g. head turn) to detect presentation attacks. Send at least 3 frames; up to 16 are analyzed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["frames"],"properties":{"frames":{"type":"array","items":{"type":"string"},"minItems":3,"description":"Base64 or data-URL frames captured during the challenge."},"challenge":{"type":"string","default":"head_turn","example":"head_turn"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveLivenessResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/email-verify":{"post":{"summary":"Verify an email address","operationId":"verifyEmail","description":"Check an email's syntax, MX/deliverability (live DNS lookup), and risk signals (disposable, role, free provider). Fully self-hosted — no third-party API.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","example":"jane@company.com"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/phone-verify":{"post":{"summary":"Verify a phone number","operationId":"verifyPhone","description":"Validate a phone number's E.164 format and detect its country from the calling code. Self-hosted and dependency-free.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["phone"],"properties":{"phone":{"type":"string","example":"+14155552671"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneVerifyResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/age-estimate":{"post":{"summary":"Estimate age from a selfie","operationId":"estimateAge","description":"Estimate the age of the largest face in a selfie — an approximate age, age band, and is_adult flag for age-assurance use cases.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","description":"Base64 or data-URL selfie image."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgeEstimateResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/ip-screen":{"post":{"summary":"Device & IP intelligence","operationId":"screenIp","description":"Classify an IP as a Tor exit node, commercial VPN, or datacenter/hosting range (free curated CIDR lists + ISP heuristics) and resolve its ASN/ISP and geo. Returns an anonymizer risk score. Omit `ip` to screen the caller's connecting IP. Fully self-hosted — no paid IP-reputation API.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"ip":{"type":"string","example":"8.8.8.8","description":"IPv4 to screen (defaults to the caller IP)."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpScreenResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/barcode":{"post":{"summary":"Decode a driver's-license barcode (PDF417/AAMVA)","operationId":"scanBarcode","description":"Decode + parse the PDF417 barcode on the back of a US/Canada driver's license or state ID (AAMVA standard) into structured fields — name, DOB, address, license number, expiry. DLs carry no MRZ, so the barcode is the only machine-readable source. Fully self-hosted — no paid SDK.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","description":"Base64 or data-URL image of the card back (barcode side)."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BarcodeData"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your API key, e.g. `Authorization: Bearer sk_live_...`"}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique key (e.g. a UUID) to safely retry this POST. The first request runs normally; repeats with the same key replay the stored response (with `Idempotency-Replayed: true`) instead of creating a duplicate. Keys are scoped to your organization and expire after 24h.","schema":{"type":"string","maxLength":255}}},"responses":{"Unauthorized":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"CreateVerification":{"type":"object","properties":{"document_type":{"type":"string","enum":["passport","id_card","drivers_license"],"default":"passport"},"applicant":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"dob":{"type":"string","description":"YYYY-MM-DD"},"country":{"type":"string","description":"ISO 3166-1 alpha-3"}}}}},"Verification":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string"},"status":{"type":"string","enum":["pending","processing","approved","rejected","needs_review"]},"mode":{"type":"string","enum":["live","test"]},"document_type":{"type":"string"},"applicant":{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]},"dob":{"type":["string","null"]},"country":{"type":["string","null"]}}},"hosted_url":{"type":"string","format":"uri"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"result":{"type":["object","null"],"description":"The full verification result (document, face_match, liveness, screening, checks, risk) once complete; null until submitted."},"signals":{"type":["object","null"],"description":"Submission-time network & behavioral risk signals: geo (IP vs declared country), disposable email, velocity, and client (bot) — with a score and level."}}},"ReverifyRequest":{"type":"object","required":["token","selfie"],"properties":{"token":{"type":"string","description":"The applicant's reusable identity token (rid_…)."},"selfie":{"type":"string","description":"A live selfie as a base64 string or data: URL."}}},"CreateBusinessVerification":{"type":"object","description":"Provide either legal_name or lei (or both).","properties":{"legal_name":{"type":"string","description":"Company legal name to search the register for."},"lei":{"type":"string","description":"Legal Entity Identifier (20-char), if known."},"jurisdiction":{"type":"string","description":"ISO jurisdiction code to disambiguate (e.g. US-CA)."},"officers":{"type":"array","description":"Directors / beneficial owners to screen.","items":{"type":"object","properties":{"name":{"type":"string"},"role":{"type":"string","description":"director | officer | ubo"}},"required":["name"]}}}},"BusinessVerification":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string"},"status":{"type":"string","enum":["pending","approved","rejected","needs_review"]},"mode":{"type":"string","enum":["live","test"]},"legal_name":{"type":"string"},"lei":{"type":["string","null"]},"jurisdiction":{"type":["string","null"]},"registration_number":{"type":["string","null"]},"entity_status":{"type":["string","null"],"description":"Registry entity status, e.g. ACTIVE."},"risk_score":{"type":"integer","description":"0..100"},"risk_level":{"type":"string","enum":["low","medium","high"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"result":{"type":["object","null"],"description":"Full KYB result: company registry record, ownership graph, sanctions/PEP screening hits, checks, and risk."}}},"CreateAddressCheck":{"type":"object","required":["image"],"properties":{"image":{"type":"string","description":"The document image as a base64 string or data: URL (JPEG/PNG)."},"declared_name":{"type":"string","description":"Expected name, to match against the document."},"declared_address":{"type":"string","description":"Expected address, to match against the document."},"recency_days":{"type":"integer","default":92,"description":"How recent the document must be to count as valid."}}},"AddressCheck":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string"},"status":{"type":"string","enum":["pending","approved","rejected","needs_review"]},"mode":{"type":"string","enum":["live","test"]},"document_category":{"type":["string","null"],"description":"utility | bank_statement | telecom | government | insurance | other"},"issuer":{"type":["string","null"]},"extracted_name":{"type":["string","null"]},"extracted_address":{"type":["string","null"]},"document_date":{"type":["string","null"],"format":"date"},"name_match":{"type":["boolean","null"]},"address_match":{"type":["boolean","null"]},"is_recent":{"type":"boolean"},"risk_score":{"type":"integer","description":"0..100"},"risk_level":{"type":"string","enum":["low","medium","high"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"result":{"type":["object","null"],"description":"Full PoA result: extracted fields, OCR text, checks, and risk."}}},"DuplicateFlag":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["face","document"],"description":"Which signal matched."},"score":{"type":"number","description":"Face cosine, or 1.0 for an exact document match."},"detail":{"type":["string","null"]},"status":{"type":"string","enum":["open","resolved","dismissed"]},"verification_id":{"type":"string"},"matched_verification_id":{"type":"string"},"matched_name":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}}},"NfcVerifyRequest":{"type":"object","required":["sod","data_groups"],"properties":{"sod":{"type":"string","description":"Base64 Document Security Object (SOD) read from the chip."},"data_groups":{"type":"object","description":"Map of data-group number (string) → base64 bytes, e.g. { \"1\": \"...\", \"2\": \"...\" }.","additionalProperties":{"type":"string"}}}},"NfcResult":{"type":"object","properties":{"chip_read":{"type":"boolean"},"chip_authentic":{"type":"boolean","description":"True only if all three Passive Authentication checks pass."},"passive_auth":{"type":"object","properties":{"dg_hashes_valid":{"type":"boolean"},"sod_signature_valid":{"type":"boolean"},"dsc_trusted":{"type":"boolean"}}},"hash_algorithm":{"type":["string","null"]},"data_groups_present":{"type":"array","items":{"type":"integer"}},"signer":{"type":["string","null"]},"mrz":{"type":["string","null"]},"reasons":{"type":"array","items":{"type":"string"}}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"}}}}},"TransactionCheck":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string"},"kind":{"type":"string","enum":["transaction","wallet"]},"mode":{"type":"string"},"amount":{"type":["number","null"]},"currency":{"type":["string","null"]},"direction":{"type":["string","null"]},"asset_type":{"type":["string","null"]},"counterparty":{"type":["string","null"]},"counterparty_country":{"type":["string","null"]},"wallet_address":{"type":["string","null"]},"customer_ref":{"type":["string","null"]},"status":{"type":"string"},"risk_score":{"type":"integer"},"risk_level":{"type":"string","enum":["low","medium","high"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"QuestionnaireTemplate":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"weight":{"type":"number"}}}}}}}}},"QuestionnaireResponse":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string"},"mode":{"type":"string"},"template_key":{"type":"string"},"template_name":{"type":"string"},"subject_ref":{"type":["string","null"]},"answers":{"type":"object","additionalProperties":{"type":"string"}},"score":{"type":"integer"},"risk_level":{"type":"string","enum":["low","medium","high"]},"flags":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"created_at":{"type":"string"}}},"FaceMatch":{"type":"object","properties":{"verificationId":{"type":"string"},"applicantName":{"type":["string","null"]},"similarity":{"type":"number","description":"Cosine similarity, 0–1."},"isMatch":{"type":"boolean","description":"At/above the 1:1 match bar (cosine ≥ 0.36)."},"reference":{"type":["string","null"],"description":"Matched verification reference."},"status":{"type":["string","null"]},"createdAt":{"type":["string","null"],"description":"ISO timestamp of the matched verification."}}},"FaceSearchResult":{"type":"object","properties":{"matches":{"type":"array","items":{"$ref":"#/components/schemas/FaceMatch"}},"count":{"type":"integer"},"threshold":{"type":"number"}}},"ActiveLivenessResult":{"type":"object","properties":{"is_live":{"type":"boolean"},"score":{"type":"number","description":"Liveness confidence, 0–1."},"method":{"type":"string","example":"motion_challenge"},"challenge":{"type":"string","example":"head_turn"},"frames_analyzed":{"type":"integer"},"signals":{"type":"object","additionalProperties":{"type":"number"}},"reasons":{"type":"array","items":{"type":"string"}}}},"EmailVerifyResult":{"type":"object","properties":{"email":{"type":"string"},"valid_syntax":{"type":"boolean"},"domain":{"type":["string","null"]},"mx_found":{"type":"boolean"},"deliverable":{"type":"boolean"},"disposable":{"type":"boolean"},"role_account":{"type":"boolean"},"free_provider":{"type":"boolean"},"risk":{"type":"object","properties":{"score":{"type":"integer"},"level":{"type":"string","enum":["low","medium","high"]},"reasons":{"type":"array","items":{"type":"string"}}}}}},"PhoneVerifyResult":{"type":"object","properties":{"phone":{"type":"string"},"e164":{"type":["string","null"]},"valid":{"type":"boolean"},"country":{"type":["string","null"]},"reasons":{"type":"array","items":{"type":"string"}}}},"AgeEstimateResult":{"type":"object","properties":{"available":{"type":"boolean","description":"Whether the age model is loaded."},"face_found":{"type":"boolean"},"age":{"type":["integer","null"],"description":"Approximate age in years."},"age_band":{"type":["string","null"],"enum":["under_18","18_24","25_39","40_59","60_plus",null]},"is_adult":{"type":["boolean","null"]},"method":{"type":"string"}}},"BarcodeData":{"type":"object","properties":{"found":{"type":"boolean","description":"A PDF417 barcode was decoded."},"format":{"type":"string","example":"pdf417"},"method":{"type":"string"},"first_name":{"type":["string","null"]},"middle_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"full_name":{"type":["string","null"]},"dob":{"type":["string","null"],"description":"ISO yyyy-mm-dd."},"expiry":{"type":["string","null"]},"issued":{"type":["string","null"]},"sex":{"type":["string","null"],"enum":["M","F","U",null]},"license_number":{"type":["string","null"]},"address":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"country":{"type":["string","null"]},"element_count":{"type":"integer","description":"AAMVA elements parsed."}}},"IpScreenResult":{"type":"object","properties":{"ip":{"type":["string","null"]},"ip_present":{"type":"boolean","description":"A usable public IPv4 was supplied."},"tor_exit":{"type":"boolean"},"vpn":{"type":"boolean","description":"IP falls in a known commercial-VPN range."},"datacenter":{"type":"boolean","description":"IP falls in a datacenter / hosting range."},"anonymizer":{"type":"boolean","description":"tor_exit OR vpn OR datacenter."},"isp":{"type":["string","null"]},"asn":{"type":["integer","null"],"description":"Autonomous-system number."},"asn_org":{"type":["string","null"]},"score":{"type":"integer","description":"0–100 anonymizer risk contribution."},"level":{"type":"string","enum":["low","medium","high"]},"reasons":{"type":"array","items":{"type":"string"}},"geo":{"type":["object","null"],"properties":{"country":{"type":["string","null"]},"country_code":{"type":["string","null"]},"country_code3":{"type":["string","null"]}}}}}}}}