Skip to main content

Create a Person

Endpoint

POST https://api.verifik.co/v2/face-recognition/persons

Creates a new person in the facial recognition system. Provide at least a name and images (base64). You can set gender, date of birth, nationality, collections (Mongo _id or collection code strings, depending on your integration), and notes.

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Params

NameTypeRequiredDescription
namestringYesFull name of the person.
imagesstring[]YesBase64-encoded face images (no data: URL prefix).
genderstringNoM or F.
date_of_birthstringNoISO 8601 date (e.g. 1990-01-15).
nationalitystringNoNationality or country code.
collectionsstring[]NoCollection identifiers to associate the person with.
notesstringNoFree-form notes.

Request

const fetch = require("node-fetch");

async function run() {
const res = await fetch("https://api.verifik.co/v2/face-recognition/persons", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
body: JSON.stringify({
name: "John Doe",
images: ["<base64>", "<base64>"],
gender: "M",
date_of_birth: "1990-01-15",
nationality: "US",
collections: ["<collection_id_or_code>"],
notes: "VIP customer",
}),
});
console.log(await res.json());
}

run();

Response

{
"id": "…",
"data": {
"_id": "…",
"name": "John Doe",
"gender": "M",
"date_of_birth": "1990-01-15",
"nationality": "US",
"thumbnails": [],
"collections": ["…"],
"notes": "VIP customer",
"client": "…",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
},
"signature": {
"message": "Certified by Verifik.co",
"dateTime": "…"
}
}

Notes

  • images must be raw base64 strings; very short payloads may be rejected (e.g. 412:only_images_in_base64).
  • Successful responses typically include Verifik envelope fields id, data, and signature; the exact data shape matches your environment and The Person Object.
  • collections is often required in practice so the person is enrolled in at least one face collection for search and verification.