> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Didit API 参考：身份验证 REST API

> Didit 完整 REST API 参考，涵盖 KYC、KYB、AML、生物识别与交易监控端点。提供 OpenAPI 规范，按量付费，每月 $10 免费额度。



独立 API 集成提示词
        将提示词复制到剪贴板



      
      

\<pre>

\``Integrate Didit standalone verification APIs into my backend for server-to-server identity checks.

\## Available Standalone APIs

\### Identity & Documents
\- POST /v3/id-verification/ — multipart/form-data: front_image (required), back_image (optional). Returns: { request_id, id_verification: { status, first_name, last_name, document_type, document_number, date_of_birth, nationality, expiration_date, issuing_state, address, parsed_address, warnings[] } }
\- POST /v3/poa/ — multipart/form-data: document (PDF/image). Returns: { request_id, poa: { status, document_type, issuer, poa_address, poa_parsed_address, issue_date, warnings[] } }
\- POST /v3/database-validation/ — JSON: { issuing_state, validation_type, first_name, last_name, date_of_birth, personal_number, ... }. Returns: { request_id, database_validation: { status, validations } }

\### Document AI
\- POST /v3/document-ai/ — multipart/form-data: document (PDF/image), fields (one JSON-encoded array string of { key, name, instruction, type: "text"|"number"|"date", required, is_full_name }, 1-30 items), expected_first_name + expected_last_name OR expected_company_name (+ expected_company_country), document_ai_name_match_score_threshold (default 80), per-risk *_action params. Returns: { request_id, document_ai: { status, extracted_data: { <key>: value|null }, detected_codes[], fields[], name_match_score, name_on_document, warnings[] } }. $0.20 per document.

\### Biometrics & Face
\- POST /v3/passive-liveness/ — multipart/form-data: user_image. Returns: { request_id, passive_liveness: { status, score, method } }
\- POST /v3/face-match/ — multipart/form-data: user_image + ref_image. Returns: { request_id, face_match: { status, score } }
\- POST /v3/face-search/ — multipart/form-data: user_image. Returns: { request_id, face_search: { status, total_matches, matches[] } }
\- POST /v3/age-estimation/ — multipart/form-data: user_image. Returns: { request_id, age_estimation: { status, age_estimation, score } }

\### Compliance
\- POST /v3/aml/ — JSON: { full_name, entity_type, date_of_birth, nationality, document_number, include_adverse_media, include_ongoing_monitoring }. Returns: { request_id, aml: { status, total_hits, hits[], score, entity_type } }

\### Business Verification (KYB)
\- POST /v3/kyb/search/ — JSON: { country_code (required), name, registration_number, tier: "basic" (default) | "shareholders" | "ubo", search_type: "contains", webhook_url, vendor_data, metadata }. `tier` picks the provider chain the search runs on; retrieve the candidate from select (Lite), shareholders or ubo. Up to $0.50 per successful request, separately from profile retrieval; empty results and failures are not charged. Returns: { request_id, kyb_registry: { companies[] ({ kyb_response_id, name, registration_number, status, type, fetch_status }), pagination, search_status, search_resolved } }. `kyb_response_id` is an opaque handle — pass it straight to select/shareholders/ubo, never parse it.
\- POST /v3/kyb/select/ — JSON: { kyb_response_id (from search), save_api_request, vendor_data, metadata }. **Lite** tier, priced per country ([per-country prices](https://docs.didit.me/getting-started/kyb-registry-pricing.md)). Returns: { request_id, kyb_registry: { status, company_name, registration_number, country_code, company_type, incorporation_date, registered_address, officers[], beneficial_owners[], fetch_status, data_resolved, ... } }
\- POST /v3/kyb/shareholders/ and POST /v3/kyb/ubo/ — same JSON shape as select. **Shareholders** and **UBOs** tiers, priced per country; delivered and billed as the highest tier the country's registries can serve. v3 only.

\### Contact Verification
\- POST /v3/email/send/ — JSON: { email }. Sends OTP code.
\- POST /v3/email/check/ — JSON: { email, code }. Verifies OTP.
\- POST /v3/phone/send/ — JSON: { phone, channel }. Sends OTP via SMS/WhatsApp/Telegram.
\- POST /v3/phone/check/ — JSON: { phone, code }. Verifies OTP.

\### Bank Verification
\- POST /v3/bank/account-check/ - JSON: { country (ISO 3166-1 alpha-3), account: { iban } or { account_number, sort_code | routing_number | ifsc | bsb | transit_institution | bank_code } or { clabe } or { cbu_cvu }, holder: { full_name } or { business_name }, vendor_data }. Checks that a bank account belongs to the name, with no session. Returns: { request_id, result: match | close_match | no_match | cannot_verify, holder_name (close_match only), account (masked), vendor_data, created_at }. Billed once per check the bank answers; errors are never billed.

\## Authentication
All requests require: Headers: { "x-api-key": DIDIT_API_KEY }
For file uploads: multipart/form-data. For JSON: Content-Type: application/json.

\## Common Parameters
\- save_api_request (bool, default true): if true, appears in Console > Manual Checks
\- vendor_data (string): your internal ID for tracking

\## Example: ID Verification (Node.js)
const FormData = require('form-data');
const fs = require('fs');
const form = new FormData();
form.append('front_image', fs.createReadStream('./id_front.jpg'));
form.append('back_image', fs.createReadStream('./id_back.jpg'));

const response = await fetch('https://verification.didit.me/v3/id-verification/', {
method: 'POST',
headers: { 'x-api-key': process.env.DIDIT_API_KEY, ...form.getHeaders() },
body: form
});
const result = await response.json();
// result.id_verification.status: "Approved" or "Declined"
// result.id_verification.first_name, .last_name, .document_number, etc.

\## Example: AML Screening
const response = await fetch('https://verification.didit.me/v3/aml/', {
method: 'POST',
headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
full_name: 'John Doe',
entity_type: 'person',
date_of_birth: '1990-01-15',
nationality: 'US'
})
});
const result = await response.json();
// result.aml.status, result.aml.total_hits, result.aml.hits

\## When to Use Standalone APIs vs Sessions
\- Standalone: you have images/data, server-to-server, batch processing, custom UX
\- Sessions: user-facing flows where Didit handles camera, UX, multi-step, 54 languages

\## Rate Limits
\- Free: 10/min. Paid: 600/min. Exceeded: HTTP 429.

\## Environment Variables
\- DIDIT_API_KEY — from Didit Console > API & Webhooks

\## Docs
\- API Reference: https://docs.didit.me/api-reference/overview
\- Sessions vs APIs: https://docs.didit.me/api-reference/overview
\- Webhooks: https://docs.didit.me/integration/webhooks``

\</pre>



      
      

粘贴到

Didit 提供**两种互补的方式**用于身份验证。了解二者的区别，有助于为您的使用场景选择合适的集成方式。### [托管会话](https://docs.didit.me/zh/sessions-api/create-session.md)提供完整的验证流程，采用预构建的优化界面。用户通过重定向、iframe 或原生 SDK 访问 Didit 的托管界面。### [独立 API](https://docs.didit.me/zh/standalone-apis/id-verification.md)直接进行服务器到服务器的 API 调用。您发送数据（图片、证件、姓名），并接收结构化的验证结果，无需终端用户界面参与。***## 托管会话 (推荐用于面向用户的流程)对于大多数集成场景，托管会话是**推荐的方式**。创建会话时，Didit 会生成一个 `verification_url`，您将其提供给用户。用户在 Didit 优化后的界面中完成整个验证流程，您可以通过 Webhook 或 API 接收结果。### 工作原理**1. 创建会话**您的服务器使用工作流 ID 调用 `POST /v3/session/`。Didit 返回 `verification_url` 和 `session_token`。**2. 呈现给用户**使用会话 token 将用户重定向、通过 iframe 嵌入，或初始化原生 SDK。**3. 用户完成验证**用户按照 Didit 优化界面中的引导式流程操作，包括证件采集、活体检测及其他附加步骤。**4. 接收结果**Didit 会向您的服务器发送包含验证决策的 Webhook，或者您可以通过检索 API 轮询结果。### 为什么推荐使用会话| 优势 | 详情 |
| - | - |
| **优化的用户体验** | 验证界面在全球范围内持续进行 A/B 测试，以获得最高的完成率 |
| **摄像头处理** | 内置智能摄像头选择、自动拍摄、质量检查和设备兼容性 |
| **引导式流程** | 为用户提供分步说明、实时反馈和错误恢复 |
| **多功能工作流** | 在单个流程中串联多项功能（身份证件验证 + 活体检测 + AML 筛查 + 电话验证 + 邮箱验证） |
| **安全** | 流程中内置反欺骗、主动活体检测和设备指纹识别 |
| **合规** | 自动处理会话级审计日志、获取同意和数据保留政策 |
| **本地化** | 支持 54 种语言，并自动检测浏览器语言 |
| **原生移动端支持** | 提供适用于 iOS、Android、React Native 和 Flutter 的原生 SDK |
| **无需维护** | Didit 负责所有界面更新、浏览器和设备问题以及摄像头的边缘情况 |### 何时使用会话- **用户入驻 / KYC**：新用户注册时需要验证身份
- **年龄验证**：确认用户满足最低年龄要求
- **重新验证**：定期对现有用户进行重新验证
- **生物识别认证**：用户在执行敏感操作时使用人脸进行认证
- **多步骤合规**：需要一次性完成身份证件验证、活体检测、AML 筛查和电话验证的流程
- **终端用户在场并直接交互的任何场景**### 会话 endpoint| endpoint | 用途 |
| - | - |
| [创建会话](https://docs.didit.me/zh/sessions-api/create-session.md) | 为用户生成验证链接 |
| [获取会话](https://docs.didit.me/zh/sessions-api/retrieve-session.md) | 获取会话的完整结果和决策 |
| [列出会话](https://docs.didit.me/zh/sessions-api/list-sessions.md) | 查询和筛选所有会话 |
| [删除会话](https://docs.didit.me/zh/sessions-api/delete-session.md) | 删除会话及所有相关数据 |
| [生成 PDF](https://docs.didit.me/zh/sessions-api/generate-pdf.md) | 将验证报告导出为 PDF |
| [共享会话](https://docs.didit.me/zh/sessions-api/share-session/share.md) | 为与合作方共享的可复用 KYC 生成共享 token |
| [导入共享会话](https://docs.didit.me/zh/sessions-api/share-session/import.md) | 导入合作方共享的会话（可复用 KYC） |***## 独立 API (用于服务器到服务器处理)独立 API 让您无需任何终端用户界面，即可**直接从服务器**调用单项验证功能。您发送数据（图像、证件、姓名），即可获得结构化结果。### 工作原理**1. 发送数据**您的服务器使用所需数据（图像、证件或 JSON 字段）调用独立 endpoint（例如 `POST /v3/id-verification/`）。**2. 接收结果**Didit 同步处理该请求，并在响应中返回结构化的验证结果。### 何时使用独立 API| 使用场景 | 示例 |
| - | - |
| **后端处理** | 您已通过自有的采集界面获取证件图像，需要对其进行验证 |
| **批量验证** | 处理运营团队上传的大批量身份证件 |
| **自定义体验** | 您已构建自有的采集流程，只希望使用 Didit 进行分析 |
| **服务器到服务器检查** | 对客户名单进行 AML 筛查，无需任何用户交互 |
| **自动化流水线** | 基于 CI/CD 或 cron 的合规复查（例如每日 AML 监控） |
| **与现有系统集成** | 将 Didit 的验证能力连接到您现有的证件管理系统 |
| **单功能调用** | 您只需要一项功能（例如仅 AML 筛查或仅人脸比对） |### 可用的独立 API**身份与证件**| API | 功能说明 |
| - | - |
| [身份证件验证](https://docs.didit.me/zh/standalone-apis/id-verification.md) | 从身份证件（正反面图像）中提取并验证数据 |
| [地址证明](https://docs.didit.me/zh/standalone-apis/proof-of-address.md) | 验证地址证明文件（水电费账单、银行对账单、政府文件） |
| [Address Validation](https://docs.didit.me/zh/standalone-apis/address-validation.md) | 确认地址存在，并返回规范化地址及坐标 |
| [数据库核验](https://docs.didit.me/zh/core-technology/database-validation/overview.md) | 将用户数据与政府数据库进行交叉核对 |**Document AI**| API | 功能说明 |
| - | - |
| [Document AI](https://docs.didit.me/zh/standalone-apis/document-ai.md) | 从任意文档（PDF 或图像）中提取您定义的字段，并进行姓名匹配和篡改检测 |**生物识别与人脸**| API | 功能说明 |
| - | - |
| [Passive Liveness](https://docs.didit.me/zh/standalone-apis/passive-liveness.md) | 仅凭单张图像验证真人在场（防欺骗攻击） |
| [人脸比对](https://docs.didit.me/zh/standalone-apis/face-match.md) | 比较两张人脸，判断是否为同一人 |
| [人脸搜索](https://docs.didit.me/zh/standalone-apis/face-search.md) | 在所有已验证的会话中搜索人脸（1:N） |
| [年龄估算](https://docs.didit.me/zh/standalone-apis/age-estimation.md) | 根据人脸图像估算个人年龄 |**合规与风险**| API | 功能说明 |
| - | - |
| [AML 筛查](https://docs.didit.me/zh/standalone-apis/aml-screening.md) | 对照制裁名单、PEP 及观察名单筛查个人或企业 |**银行验证**| API | 功能说明 |
| - | - |
| [Account check](https://docs.didit.me/zh/standalone-apis/bank-account-check.md) | 在向某个银行账户转账前，核实该账户属于您指定的个人或企业 |**企业验证（KYB）**| API | 功能说明 |
| - | - |
| [KYB Registry Search](https://docs.didit.me/zh/standalone-apis/kyb-registry-search.md) | 按名称、注册号和国家/地区搜索公司登记；每次成功的请求最高 \$0.50 |
| [KYB Registry Select](https://docs.didit.me/zh/standalone-apis/kyb-registry-select.md) | 为选定的公司获取完整的登记档案（高管、实际受益人、地址） |***## 并排对比| | 托管会话 | 独立 API |
| - | - | - |
| **集成工作量** | 低：重定向、iframe 或 SDK | 中等：由您处理数据采集与提交 |
| **用户交互** | 有：用户在 Didit 界面中完成流程 | 无：仅限服务器到服务器 |
| **摄像头与采集** | 由 Didit 处理（已优化） | 由您提供图像或数据 |
| **多功能流程** | 支持：在工作流中串联多项功能 | 每次 API 调用一项功能 |
| **体验优化** | 持续进行 A/B 测试 | 由您控制体验 |
| **本地化** | 54 种语言，自动检测 | 不适用（无界面） |
| **Webhook** | 自动发送状态通知 | 不适用（同步响应） |
| **响应时间** | 异步（用户按自己的节奏完成） | 同步（几秒钟） |
| **适用于** | 面向用户的入驻与验证 | 后端处理与自动化 |
| **控制台可见性** | 在仪表板中查看完整的会话生命周期 | 显示在 Manual Checks 部分中 |***## 两者可以同时使用吗**可以。** 许多团队会结合两种方式：1) **用于入驻的会话**：新用户在注册期间完成完整的托管验证流程
2) **用于持续监控的独立 AML**：定时任务每晚根据最新的观察名单对所有已通过的用户进行复筛
3) **用于重复检测的独立人脸搜索**：新会话通过审核后，您的服务器调用人脸搜索检查是否存在重复
4) **用于运营的独立身份证件验证**：您的合规团队为边缘案例复核而手动上传证件### 示例: 组合架构| 您的应用 | Didit API | 类型 |
| - | - | - |
| **用户注册流程** | Sessions API（托管界面） | 面向用户 |
| **每晚 AML 复筛** | 独立 AML API | 服务器到服务器 |
| **运营团队证件审核** | 独立身份证件验证 API | 服务器到服务器 |
| **重复人脸检测** | 独立人脸搜索 API | 服务器到服务器 |***## 快速开始### [使用会话快速开始](https://docs.didit.me/zh/integration/api-full-flow.md)在 5 分钟内创建您的第一个托管验证会话。### [API 认证](https://docs.didit.me/zh/getting-started/api-authentication.md)获取 API 密钥，开始发起经过身份验证的请求。### [配置 Webhook](https://docs.didit.me/zh/integration/webhooks.md)验证状态变化时实时接收通知。### [创建工作流](https://docs.didit.me/zh/console/workflows.md)在 Business Console 中构建自定义验证流程。***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.