人物の作成
顔画像とメタデータを使用して新しい人を登録します。
menu_bookAPI リファレンス: 個人の作成expand_more
公式ドキュメント: docs.verifik.co/resources/create-a-person
Base URL https://api.verifik.co. Send JSON with profile fields and at least one base64 face image per entry in images (no data URL prefix). The public docs also list optional fields such as notes, email, and phone.
POST /v2/face-recognition/persons
Verifik による認識のための顔生体認証を使用して、新しい人を指定されたコレクション ID (collection _id 値) に登録します。
| ヘッダ | 価値 |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
| パラメータ | 要求 | 説明 |
|---|---|---|
| 名前 | はい | 表示名 |
| 画像 | はい | Base64 顔画像の配列 (データ URL ではなく生の Base64) |
| 性別 | はい | M または F (このデモでは必須) |
| 生年月日 | はい | YYYY-MM-DD (このデモでは必須) |
| コレクション | はい | コレクション _id 文字列の配列。このデモでは、GET /v2/face-recognition/collections からそれらをロードし、1 つ以上を選択できます。 |
| 国籍 | いいえ | オプションの国/国籍コードまたはラベル |
await fetch("https://api.verifik.co/v2/face-recognition/persons", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${accessToken}`,
},
body: JSON.stringify({
name: "Jane Doe",
gender: "F",
date_of_birth: "1990-01-15",
collections: ["<collectionMongoId>"],
nationality: "CO",
images: ["<base64>", "<base64>"],
}),
});// 200 OK — example shape
{
"data": {
"id": "…",
"name": "Jane Doe",
"gender": "F",
"date_of_birth": "1990-01-15",
"collections": ["…"],
"…": "…"
}
}- このデモでは、セッション トークンを使用して @humanauthn/api-client からの createperson を使用します。
- 環境に応じて、応答にはデータとともに ID と署名ブロックが含まれる場合があります。
menu_book
関連ドキュメント
docs.verifik.co の公式ガイド