POST
/
faces
Add a new face to a collection
curl --request POST \
  --url https://idverify-api.argosidentity.com/modules/faces \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "collectionId": "col_123456789",
  "userName": "John Doe",
  "faceImage": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ..."
}'
{
  "message": "Face added successfully",
  "faceId": "face_123456789",
  "metaFaceId": "meta_123456789",
  "option": {}
}
The “Add a new face to a collection” section allows users to easily upload and store a new facial image within a specific collection. By utilizing this functionality, users can efficiently manage and organize their facial recognition data by adding new faces to their existing database. This section streamlines the process of expanding collections with additional facial data for enhanced accuracy and efficiency in facial recognition applications.

Request

Headers

x-api-key
string
required
The API key used for authentication and access control. This header parameter is required for authorization to add a new face to a collection.

Body Parameters

collectionId
string
required
Unique identifier of the collection where the face will be added.
userName
string
required
Name associated with the face being added to the collection.
faceImage
string
required
Base64-encoded string representation of the face image.

Response

Success Response (200)

message
string
A success or error message indicating the result of the face submission
faceId
string
Unique identifier for the face submission.
metaFaceId
string
Unique identifier corresponding to the metadata of the face submission.
option
object
Additional options and metadata for the face submission.

Error Responses

Bad Request (400)

errorCode
number
Identifies the specific error for troubleshooting:
  • 6010: CollectionId is required
  • 6011: WorkspaceId is required
  • 6012: Fail to add face
  • 6013: Cannot find collection info
  • 6014: This collection is unavailable
  • 6015: Failed to validate liveness of face
  • 6016: Image size is too large
  • 6017: Unsupported image format
message
string
Briefly describes the error. Please refer to the error code for details.

Forbidden (403)

errorCode
number
Identifies the specific error for troubleshooting.
message
string
Briefly describes the error:
  • API Key is required
  • Access Denied: API Key is unavailable

Authorizations

x-api-key
string
header
required

Body

application/json

Response

200
application/json

Face successfully added to collection

The response is of type object.