Add image to applicant action

Overview

Use this method to add an image file to an applicant action (for example, a bank card image to the payment method). This endpoint is helpful for working through the API without using the SDKs.

Request example

curl -X POST \
   'https://api.sumsub.com/resources/applicantActions/5e022e0f0a975a45325c7ff5/images' \
    -H 'Content-Type: multipart/form-data' \
    -F 'metadata={"idDocType":"PAYMENT_METHOD","country":"GBR"}' \
    -F 'content=@/Sumsub/Example/name.jpg'

Response explained

If the request is sent and processed correctly, in the response, you will get the JSON file representing the document information.

FieldTypeDescription
idStringImage object identifier.
addedDateDateDate and time (UTC) when the image was uploaded.
imageHashStringChecksum of the uploaded image file.
imageFileNameStringName of the image file.
resizedImageIdStringUnique identifier of the resized image.
mimeTypeStringImage file mime-type.

The full list of mime-types and file formats, you can find in our FAQ (See the answer to What file extensions do you accept?).
sigHashStringSigned image hash.
imageIdStringUnique image file identifier.
actualResolutionObjectIncludes the actual width and height of the image in pixels.
answerStringIndicates the image check result (GREEN, RED, ERROR).
idDocDefObjectAdditional information about the document.
reviewResultObjectSince we only send the image, the object returned is empty because no check is done yet. When the check is performed, the object would contain the following information.
attemptIdStringIdentifier of the attempt to upload the image.

idDocDef attributes

The following table explains the idDocDef attributes representing the additional information about the document.

FieldTypeDescription
countryStringAlpha-3 code (for example, DEU, GBR, ARG, and so on) of the country where the document was issued.
idDocTypeStringType of document that is specified in the level to be provided for verification. For example, PASSPORT, SELFIE, VIDEO_SELFIE, PAYMENT_METHOD and so on.

See the list of supported document types for details.
idDocSubTypeStringFRONT_SIDE, BACK_SIDE or null.

Response example

{
  "id": "66bb6c71546bfc57cffe92a8",
  "addedDate": "2024-08-13 14:23:45",
  "creatorClientId": "API",
  "imageHash": "64d2f3aa8da8a98fffaf751a9c323981474f6375",
  "imageFileName": "image-name.png",
  "resizedImageId": 603758274,
  "mimeType": "png",
  "sigHash": "3809bc3c-831d-4be3-8cee-1684553beffe",
  "imageId": 1411431805,
  "fileSize": 1362,
  "actualResolution": {
      "width": 192,
      "height": 192
  },
  "answer": "GREEN",
  "idDocDef": {
      "country": "GBR",
      "idDocType": "PAYMENT_SOURCE"
  },
  "reviewResult": {},
  "attemptId": "teinm"
}

If the request fails, you will receive an HTTP response containing an error code along with a message explaining the error.

For example:

{
  "description": "HTTP 400 Bad Request",
  "code": 400,
  "correlationId": "dd987d5386c9ad319f897efa0233f1e8"
}
Language
Credentials
Header
Click Try It! to start a request and see the response here!