Why migrate
Standard response envelope
status + payload + execution_context
structure, so error handling and parsing are uniform across the platform.Unified authentication
Authorization: Bearer scheme (API key or JWT) replaces the legacy
per-endpoint auth, with role-based permissions.Value-first identifier matching
document_type to get an exact ID hit.Multi-list in one call
summary and
per-list results.At a glance
Migration in 5 steps
Switch the base URL and endpoint
https://stg.kyc.legaltalent.ai/kyc for integration testing,
then https://kyc.legaltalent.ai/kyc for production. The method stays POST.Switch to Bearer authentication
Authorization: Bearer header using your
API key (sk_...) or a JWT. See Authentication.
You no longer pass tenant_id in the body — it is derived from the token.Keep your request body (with minor tweaks)
subject object is backward compatible. If you used match_type, send
search_type instead. Accepted values: exact, fuzzy, token, composite,
fast_precise_cascade (default). The legacy default was composite — send it
explicitly if you want to preserve the previous matching behavior. Lists move
from lists_to_check to lists.Update your response parser
result (single list) or results keyed by
list name plus summary (multi-list), and execution_context.request_id for the
correlation id. There is no data or meta wrapper. See the field mapping below.Re-point your risk/decision logic
matches[].confidence_score for per-match intensity and is_match /
summary.match_count for the decision, deriving your own risk level from the score
(see Risk and decisioning).Authentication
The legacy integration used a dedicated credential on the legacy gateway. The v2 API uses a single Bearer scheme for both user (JWT) and machine-to-machine (API key) access.POST /kyc requires the kyc:create permission. The token also scopes the request
to your tenant, so remove any tenant_id you previously sent in the request body.Request changes
The request body is largely unchanged. The main adjustments:Identifier matching improvement
In v2, identifier matching is value-first: an exact ID/document number matches a list entry regardless of how the document-type label is named on either side (CI, DNI, National ID, document_id, numeric id, etc.). Values are normalized
(non-alphanumeric characters stripped, case-insensitive) before comparison.
- Recommended (v2)
- Still supported
document_type to get an exact ID hit:ci, document_id,
a numeric id, or inside an identifiers[] array.Response changes
The biggest change is the envelope. Below is the same multi-list screening in both formats, side by side.Field mapping
list_name) return the result under a top-level
result object and have no summary. Multi-list responses (using lists,
or omitting both) return results keyed by list name plus an aggregate summary.
In multi-list responses each match also carries a source_list field. There is no
data or meta wrapper. See List Check for full schemas.Risk and decisioning
The v2 API returns the raw matching signal and leaves the risk classification to you. There is nooverall_risk_level, recommended_action, or per-match
risk_level in the response.
- Per match —
confidence_score(0.0–1.0): the intensity of an individual hit. An exact identifier match is always1.0. Name matches are scored by the search engine and refined bynationality/birth_date. - Aggregate —
summary.is_match/summary.match_count/summary.lists_with_matches: whether anything matched, how many, and on which lists.
risk_level or an aggregate
overall_risk_level, derive your own level from confidence_score using thresholds
that fit your risk appetite:
Error handling
Errors also move into the standard envelope.Migration checklist
Update endpoint and base URL
POST /kyc on the staging host first.Move to Bearer auth
tenant_id.Rename match_type → search_type and lists_to_check → lists
"search_type": "composite" to keep the legacy default behavior.Re-map the response
result (single) or results + summary (multi); switch
has_matches → is_match, matched_entity → match_data,
job_id → execution_context.request_id. Drop any data / meta access.Re-point risk logic
matches[].confidence_score; the v2 response has no
overall_risk_level / recommended_action.Update error handling
status and read error.type / error.message; handle 401 / 403.Validate on staging, then cut over
FAQ
Do I have to change my request body?
Do I have to change my request body?
subject object is backward compatible. The only common changes are
renaming match_type to search_type and removing any tenant_id from the body.Will the same input produce the same matches?
Will the same input produce the same matches?
document_type. Name-based scoring is unchanged.What happened to per-match risk_level?
What happened to per-match risk_level?
confidence_score (0.0–1.0); derive your own level from it and
apply your decision policy. Use summary.is_match / summary.match_count for the
overall outcome.Can I run both versions during migration?
Can I run both versions during migration?
Do I need to re-issue credentials?
Do I need to re-issue credentials?
kyc:create permission.