curl -X POST 'https://verification.didit.me/v3/lists/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Trusted office IPs",
"description": "Office egress ranges",
"list_type": "allowlist",
"entry_type": "ip_address"
}'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.lists.create(
name="Trusted office IPs",
description="Office egress ranges",
list_type="allowlist",
entry_type="ip_address",
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.lists.create({
name: "Trusted office IPs",
description: "Office egress ranges",
list_type: "allowlist",
entry_type: "ip_address",
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Lists.Create(ctx, didit.ListsCreateParams{
Name: "Trusted office IPs",
Description: didit.String("Office egress ranges"),
ListType: "allowlist",
EntryType: "ip_address",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import me.didit.Didit;
import me.didit.types.ListsCreateParams;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.lists().create(ListsCreateParams.builder()
.name("Trusted office IPs")
.description("Office egress ranges")
.listType(ListsCreateParams.ListType.of("allowlist"))
.entryType(ListsCreateParams.EntryType.of("ip_address"))
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->lists->create([
'name' => 'Trusted office IPs',
'description' => 'Office egress ranges',
'list_type' => 'allowlist',
'entry_type' => 'ip_address',
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.lists.create(
name: "Trusted office IPs",
description: "Office egress ranges",
list_type: "allowlist",
entry_type: "ip_address"
)
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Lists.CreateAsync(new ListsCreateParams
{
Name = "Trusted office IPs",
Description = "Office egress ranges",
ListType = "allowlist",
EntryType = "ip_address",
});
Console.WriteLine(JsonSerializer.Serialize(result));{
"uuid": "22222222-3333-4444-5555-666666666666",
"name": "Trusted office IPs",
"description": "Office egress ranges",
"list_type": "allowlist",
"entry_type": "ip_address",
"is_system": false,
"entry_count": 0,
"last_entry_added_at": null,
"created_at": "2026-10-12T09:15:44.031876Z",
"updated_at": "2026-10-12T09:15:44.031876Z"
}创建名单 API:白名单与自定义名单
POST /v3/lists/:为您的 Didit 应用创建新的白名单或自定义名单。系统黑名单自动预置。按次计费,无需签订合同。
curl -X POST 'https://verification.didit.me/v3/lists/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Trusted office IPs",
"description": "Office egress ranges",
"list_type": "allowlist",
"entry_type": "ip_address"
}'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.lists.create(
name="Trusted office IPs",
description="Office egress ranges",
list_type="allowlist",
entry_type="ip_address",
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.lists.create({
name: "Trusted office IPs",
description: "Office egress ranges",
list_type: "allowlist",
entry_type: "ip_address",
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.Lists.Create(ctx, didit.ListsCreateParams{
Name: "Trusted office IPs",
Description: didit.String("Office egress ranges"),
ListType: "allowlist",
EntryType: "ip_address",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import me.didit.Didit;
import me.didit.types.ListsCreateParams;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.lists().create(ListsCreateParams.builder()
.name("Trusted office IPs")
.description("Office egress ranges")
.listType(ListsCreateParams.ListType.of("allowlist"))
.entryType(ListsCreateParams.EntryType.of("ip_address"))
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->lists->create([
'name' => 'Trusted office IPs',
'description' => 'Office egress ranges',
'list_type' => 'allowlist',
'entry_type' => 'ip_address',
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.lists.create(
name: "Trusted office IPs",
description: "Office egress ranges",
list_type: "allowlist",
entry_type: "ip_address"
)
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.Lists.CreateAsync(new ListsCreateParams
{
Name = "Trusted office IPs",
Description = "Office egress ranges",
ListType = "allowlist",
EntryType = "ip_address",
});
Console.WriteLine(JsonSerializer.Serialize(result));{
"uuid": "22222222-3333-4444-5555-666666666666",
"name": "Trusted office IPs",
"description": "Office egress ranges",
"list_type": "allowlist",
"entry_type": "ip_address",
"is_system": false,
"entry_count": 0,
"last_entry_added_at": null,
"created_at": "2026-10-12T09:15:44.031876Z",
"updated_at": "2026-10-12T09:15:44.031876Z"
}allowlist 和 custom 列表:Didit 为每种条目类型预置一个系统黑名单,您可以通过创建条目向其中添加条目。
请谨慎选择 entry_type:它创建后无法更改,并且决定了添加每个值时的验证方式。各类列表的作用请参阅列表。授权
您的应用 API 密钥,可在 Business Console 的“开发者 -> API 密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域:针对每个资源设为无权限、只读或读写,限定于特定工作流或已通过的会话、限定于 IP 地址列表,以及设置到期日期。401 表示密钥错误、已撤销或已过期;403 表示未发送密钥、密钥无权访问该资源或操作,或请求来自其 IP 列表之外的地址;在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF URL 将为 null;没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅 https://docs.didit.me/console/api-keys。
请求体
名单名称。必须与该应用的所有其他名单名称不同,包括系统名单。
1 - 255allowlist 或 custom。若为 blocklist 则以 400 拒绝。
allowlist, custom 该名单包含的内容:face、document(证件号码)、phone、email、ip_address(IP 地址或 CIDR 范围)、device_fingerprint、wallet_address、bank_account、country(ISO 3166-1 alpha-3)、user 或 business(您的 vendor_data),或 key(任意字符串)。它决定了条目值的验证和匹配方式。后续无法更改。
face, document, phone, email, ip_address, device_fingerprint, wallet_address, bank_account, country, user, business, key 可选的自由文本描述。
响应
名单已创建。
某个应用的黑名单、白名单或自定义名单。
名单标识符。在名单和条目 endpoint 中用作 list_uuid,并在带有 value_type: "list" 的工作流或交易规则条件中用作值。
名单名称,在应用的各个名单中具有唯一性。
255自由文本描述。未设置时为空字符串。
blocklist:匹配会拒绝会话或交易(仅限系统名单,每种条目类型一个)。allowlist:匹配的项目受信任,例如人脸白名单会跳过重复人脸操作;绝不会覆盖黑名单匹配。custom:用于工作流和交易规则条件(value_type: "list")。
blocklist, allowlist, custom 该名单包含的内容:face、document(证件号码)、phone、email、ip_address(地址或 CIDR 范围)、device_fingerprint、wallet_address、bank_account、country(ISO 3166-1 alpha-3)、user 或 business(您的 vendor_data),或 key(任意字符串)。它决定了条目值的验证和匹配方式。
face, document, phone, email, ip_address, device_fingerprint, wallet_address, bank_account, country, user, business, key true 表示由 Didit 预配的名单:每种条目类型一个黑名单(face、document、phone、email、ip_address、device_fingerprint、wallet_address、bank_account、user、business)、High Risk Countries 自定义名单以及系统白名单。系统名单无法重命名、编辑或删除;您可以添加和删除其中的条目。
当前列表中条目的数量。
x >= 0添加最新当前条目的时间。名单为空时为 null。
名单创建时间。
名单最后更新时间。