KTP Check
Verify NIK, name, date of birth, and KTP photo.
Base URL
https://use.api.co.id
Send nik, name, date_of_birth, a KTP photo (identity), and an optional selfie to POST /id-verification/verify as multipart/form-data with the x-api-co-id header. The response contains result (verified or rejected), the provider message, and an optional reject_reason.
Do not log NIK, names, tokens, image files, or base64 payloads.
Request fields
| Field | Required | Rule |
|---|---|---|
nik | yes | 16 digits |
name | yes | Name as shown on the ID |
date_of_birth | yes | Format DD-MM-YYYY |
identity | yes | KTP photo JPG/JPEG/PNG, max 5 MB |
selfie | no | Selfie photo JPG/JPEG/PNG, max 5 MB |
curl -X POST "https://use.api.co.id/id-verification/verify" \
-H "x-api-co-id: YOUR_API_KEY" \
-F "nik=1203122810970002" \
-F "name=User Info" \
-F "date_of_birth=01-10-1990" \
-F "identity=@/absolute/path/to/ktp.jpg" \
-F "selfie=@/absolute/path/to/selfie.jpg"
Server-side fields
- You don't send
reference_number. API.CO.ID generates it automatically and returns it in the response. - If the provider needs an email or phone, API.CO.ID uses the account email and the phone number from approved KYC.
- If
selfieis sent, API.CO.ID forwards it to the provider and returns the provider response as is. If it is not sent, API.CO.ID uses an internal fallback selfie to stay compatible with older requests.
Results
Verified:
{
"is_success": true,
"message": "Success",
"data": {
"reference_number": "REF-20260725-0001",
"channel_id": "001",
"result": "verified",
"message": "digital certificate has been issued"
}
}
Rejected:
{
"is_success": true,
"message": "Success",
"data": {
"reference_number": "REF-20260725-0002",
"channel_id": "001",
"result": "rejected",
"message": "identity did not match",
"reject_reason": {
"code": "ID_MISMATCH",
"reason": "identity mismatch"
}
}
}
result: rejected still returns HTTP 200 because the provider processed the verification successfully; the match just didn't pass. It counts as a successful business request.
Access & billing
API.CO.ID checks access in this order:
- Valid API key.
- Enough balance/subscription for
id-verification. - Customer eKYC approved.
- Request forwarded to the provider.
- Points charged only if the provider processes the request.
Common errors
| HTTP | Condition |
|---|---|
| 400Bad Request | KTP file missing, unsupported file type, or file larger than 5 MB |
| 401Unauthorized | API key missing or wrong |
| 402Payment Required | Insufficient balance/subscription |
| 403Forbidden | eKYC not approved, pending, rejected, or expired |
| 422Unprocessable | Invalid NIK, DOB, account email, KYC phone number, or other field format |
| 500Server Error | Provider channel misconfigured |
| 502Bad Gateway | Provider auth/server/response error |
| 504Gateway Timeout | Provider timeout |
Verify KTP identity
Matches NIK, name, date of birth, an identity document, and optionally the user's selfie. When selfie is provided, API.CO.ID forwards that selfie to the provider and returns the processed provider response without overriding the business result. When selfie is omitted, API.CO.ID uses an internal fallback selfie for backward compatibility. A rejected identity match is returned as a processed business response with result: rejected. Do not log NIK or image/base64 data.
| Name | Type | Description |
|---|---|---|
nikRequired | string | 16 digit Indonesian identity number Example: 1203122810970002 |
nameRequired | string | Example: User Info |
date_of_birthRequired | string | Date of birth in DD-MM-YYYY format Example: 01-10-1990 |
identityRequired | file | Identity document image in JPG, JPEG, or PNG format; maximum 5 MB |
selfieOptional | file | Optional selfie image in JPG, JPEG, or PNG format; maximum 5 MB. If provided, API.CO.ID forwards this image to the provider and does not override the provider business result. |
| Name | Type | Description |
|---|---|---|
is_successRequired | boolean | Example: true |
messageRequired | string | Example: Success |
dataRequired | object | |
data.reference_numberRequired | string | |
data.channel_idRequired | string | Example: 001 |
data.resultRequired | string | Values: verifiedrejected |
data.messageOptional | string | |
data.reject_reasonOptional | object | |
data.reject_reason.codeOptional | string | |
data.reject_reason.reasonOptional | string |
curl -X POST "https://use.api.co.id/id-verification/verify" \ -H "x-api-co-id: $API_CO_ID_KEY" \ -F "nik=1203122810970002" \ -F "name=User Info" \ -F "date_of_birth=01-10-1990" \ -F "[email protected]" \ -F "[email protected]"{ "is_success": true, "message": "Success", "data": { "reference_number": "REF-20260714-0001", "channel_id": "001", "result": "verified", "message": "digital certificate has been issued" }}