---
sourceType: official-guide
sourceTypeMatchedRule: fallback
slug: MA/eKYC/apis/imageUpload
title: Image Upload
---
API to upload necessary images.

### Request

- Endpoint: `/v1/api/ekyc-verify/upload`
- Method: POST
- Header

  | Name    | Type   | Required | Description                                                                                                                              |
  | ------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
  | api_key | string | yes      | The API key associated with your account to authenticate requests (for development, check the [Credentials](/docs/MA/eKYC/credentials) section). |

- Parameters

  | Name       | Type          | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
  | ---------- | ------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | session_id | string        | yes      | Current session ID.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
  | image_type | string (enum) | yes      | Supported image types: • ID card front image: idcard • ID card back image: back_idcard • Driver license front image: driver_license • Passport front image: passport • Documentation front image (unknown type): front_id_doc • Documentation back image (unknown type): back_id_doc • Selfie image: selfie • Selfie image 1 for selfie vs selfie matching: base_selfie • Selfie image 2 for selfie vs selfie matching: query_selfie • QR image: qr |
  | uid        | string        | no       | User ID.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
  | prod_id    | string        | no       | Product ID.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
  | oa_id      | string        | no       | OA id which is used to encode uid                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  | app_id     | string        | no       | App id which is used to encode uid                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

- Body

  - Type: _application/json_
  - Data:

    | Name        | Type   | Required | Description     |
    | ----------- | ------ | -------- | --------------- |
    | image_bytes | binary | yes      | Uploaded image. |

### Response

- Status: `200 OK`
- Body: JSON

  ```json
  {
    "code": 0,
    "message": "Successful",
    "data": "<ENCRYPTED_DATA_IN_BASE64>"
  }
  ```

  - Field “data”: Decrypt the “data” field as described in the [Decrypt response data](/docs/MA/eKYC/encryption#decrypt-response-data) section to get the JSON object with following fields.

    | Name     | Type   | Description               |
    | -------- | ------ | ------------------------- |
    | photo_id | number | ID of the uploaded image. |
