Skip to main content
POST
KTP Details Extraction
Submit one image of the front of an Indonesian KTP as documentImage, together with your trustFlowId and trustValidationId. The endpoint accepts JPG, JPEG, PNG, and PDF files up to 2 MB. The response returns every KTP field with its own confidence score, the cropped portrait and signature, and an overall data.outcome.

Image quality guide

The endpoint reads the KTP with OCR, so the quality of the image directly limits what it can extract. A sharp, evenly lit, uncropped image produces complete fields with high confidence. A blurred, dark, or partly covered image produces missing fields, low confidence scores, or values that were misread. A poor image does not usually make the request fail. The engine still returns an answer as HTTP 200, and the call is billed. Check verificationStatus and the fields described below before you rely on any extracted value.

Success, status, and quality are separate

Read the response in three layers. Each layer answers a different question.

How the status is decided

data.missingFields names the fields behind a partial or rejected result. A field counts as unreadable when its value is null, or when its confidence is 1.0. A NIK that is not exactly 16 digits also counts as unreadable. The 1.0 confidence is a floor, not a real 1% reading. It means no usable score was available. A very poor image of a real KTP can produce REJECTED with wrong_document_type. This happens when the engine cannot read enough of the card to recognise it as a KTP. For guidance on capturing a clear, readable KTP image, see How to properly capture documents.

Authorizations

Authorization
string
header
required

Use Bearer {your_api_token} in the Authorization header.

Headers

Accept
string
default:application/json

Body

multipart/form-data
documentImage
file
required

Image file of the KTP card.

trustFlowId
integer
required

Identifier used to categorize or group requests for tracking or reporting.

trustValidationId
string
required

A unique ID used to identify your verification request.

Response

Indonesia KTP details extraction processed successfully

success
boolean
message
string
data
object
verificationStatus
string
verificationStatusCode
integer
trustFlowId
integer
trustValidationId
string
verificationType
string
metadata
unknown
createdAt
string