๐Ÿ“จ [POST] Add Face

Add a new face to a collection.

Type : POST

Input Data (Body):

collectionIdstringYesUnique ID of the collection to add the face to.
userNamestringYesName associated with the face being added.
faceImagestring (base64)YesBase64 string of the face image.

Output Data:

messagestringThe success or error message.
faceIdstringThe unique ID of the Face submission.
metaFaceIdstringThe unique ID of the corresponding Face.
optionobjectOptions used history object.
option.option_livenessbooleanWhether the Liveness option is enabled or disabled.
option.liveNess_thresholdnumberThe threshold for the Liveness option.
livenessScorenumberThe Liveness result score.

Error (403)

Error codeError messageDescription
6039API Key is required.Missing API Key: x-api-key is missing in header
6040Access Denied: API Key is unavailable.Unregistered API Key: Access restriction

Error (400)

Error codeError messageDescription
6010CollectionId is requiredCollectionId is missing
6011WorkspaceId is required.Face image missing
6012Fail to add face.Unspecified error
6013Cannot find collection info.If the collection information does not exist
6014This collection is unavailableThe collection has already been deleted
6015Failed to validate liveness of faceIf a liveness error occurred
6016Image size is too large.Image is too large
6017Not supported image format.Image is not formatted correctly
  • Request Headers
x-api-key : "string"
  • Request Data
    "faceImage" : "string", 
    "collectionId" : "string",
    "userName" : "string"
  • Response
    "message": "success",
    "faceId": "string",
    "metaFaceId" : "string",
    "option": {
        "option_liveness": Boolean,
        "liveNess_threshold": number,
        "livenessScore": number
  • Error Response
   errorCode: number,
   message: "string"