> For the complete documentation index, see [llms.txt](https://docs.vida.id/identity-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vida.id/identity-stack/verify/document-ai/ocr-and-document-verification/ocr-and-document-verification-v1/full-details-endpoint/id-verification.md).

# ID-Verification

This API is used to validate an ID card's authenticity. The API would include "idVerification" in the operations list and supply relevant image data of the ID card. The API then inspects the document for landmarks, checks for potential forgery, and identifies possible spoofing attempts. The result of the verification process is returned to the user.

Users must include "`idVerification`" in the operations list and provide necessary data in the request's payload. After successfully processing the request, the service returns the results in a structured JSON format.

### API Description

<mark style="color:green;">`POST`</mark> `https://{vida-host}/api/v1/verify`

#### Headers

| Name                                             | Type   | Description                 |
| ------------------------------------------------ | ------ | --------------------------- |
| Content-Type                                     |        | Format type of request body |
| Authentication<mark style="color:red;">\*</mark> | String | Bearer \<Token>             |

#### Request Body

<table><thead><tr><th width="155">Name</th><th width="98">Type</th><th>Description</th></tr></thead><tbody><tr><td>operations<mark style="color:red;">*</mark></td><td>String</td><td>["idVerification"]</td></tr><tr><td>payload<mark style="color:red;">*</mark></td><td>String</td><td><p>{ </p><p>    "partnerTrxId": "random-uuid", </p><p>    "groupId": "random-uuid",</p><p>    "country": "country code",</p><p>    "idType": "ID_TYPE",</p><p>    "idSubtype": "IDSubType",</p><p>    "idFrontSideImage": "Base64 encoded image of ID frontside"</p><p>}</p></td></tr><tr><td>userConsent<mark style="color:red;">*</mark></td><td>String</td><td><p>{ </p><p>    "userIp": "0.0.0.0",</p><p>    "country": "MYS",</p><p>    "obtained": true,</p><p>    "obtainedAt": "1680700959"</p><p>}</p></td></tr></tbody></table>

## 🔍 Spoof Check - Malaysian and KTP cards

* **Malaysian Cards**: Spoof detection involves multiple techniques to verify authenticity and ensure the image is **not recaptured** or in **black and white**.
* **KTP Cards**: Spoof detection involves various techniques to verify the card's authenticity and checks for **recapture**, **black and white**, **colour print**, and **screenshots** to prevent fraud.

## 📍 Landmark Check - Malaysian and KTP cards

Landmark checks for Malaysian cards and KTP cards involve examining specific features and elements designed to verify the card's authenticity.

## 🛡️ Forgery check - MyKad and KTP cards

⚠️ **NOTE:**\
Forgery checks are **only supported for MyKad and KTP cards**.

* **MyKad**: The process involves a series of steps to verify the card's authenticity and detect any signs of tampering or counterfeit.
* **KTP**: The process involves examining various security features and elements to ensure the card's authenticity and detect any signs of tampering.
