人物の作成

人物の作成

顔画像とメタデータを使用して新しい人を登録します。

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-Typeapplication/json
AuthorizationBearer <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 の公式ガイド