Feel free to reach techsupport@surepass.io for any technical support or guidance.
Authorization header in the following format:Authorization: Bearer <YOUR_JWT_TOKEN>| Environment | Base URL |
|---|---|
| Sandbox | https://sandbox.surepass.app |
| Production | https://kyc-api.surepass.app |
⚠️ Important: JWT tokens are environment-specific. A sandbox token will not work against the production endpoint and vice versa.
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token for authentication. Format: Bearer <JWT_TOKEN> |
Content-Type | Yes | Must be multipart/form-data since the request includes a file upload |
multipart/form-data with the following fields:| Parameter | Type | Required | Description |
|---|---|---|---|
image_type | String | Yes | Type of identity document being submitted. Accepted values: pan or aadhaar |
password | String | Yes | Password for the document file if it is password-protected. Leave empty if the file is not encrypted |
file | File (binary) | Yes | The document image file to be processed. Send as application/octet-stream |
file field must be uploaded as a multipart file part with application/octet-stream content type. See the Code Samples section below for language-specific implementations.| Parameter | Type | Description |
|---|---|---|
status_code | Integer | HTTP status code of the response (e.g., 200 for success) |
success | Boolean | true if the request was processed successfully, false otherwise |
message | String / null | Human-readable message describing the result. null on success |
message_code | String | Machine-readable status code. "success" on successful processing |
data | Object | Root object containing the OCR result |
data.client_id | String | A unique identifier for this OCR request, generated by the system |
data.image_type | String | The document type that was processed, echoing the value sent in the request (pan or aadhaar) |
data.ocr_response | Object | Container for the OCR output |
data.ocr_response.ocr_fields | Array | Array of extracted field objects. Typically contains one object per submitted document |
ocr_fields[].document_type | String | Document type identified during processing |
ocr_fields[].pan_number | Object | Extracted PAN number (present for pan document type) |
ocr_fields[].pan_number.value | String | The extracted PAN number value |
ocr_fields[].pan_number.confidence | Integer | Confidence score (0–100) for the extracted PAN number |
ocr_fields[].full_name | Object | Extracted full name of the document holder |
ocr_fields[].full_name.value | String | The extracted full name value |
ocr_fields[].full_name.confidence | Integer | Confidence score (0–100) for the extracted full name |
ocr_fields[].father_name | Object | Extracted father's name of the document holder |
ocr_fields[].father_name.value | String | The extracted father's name value |
ocr_fields[].father_name.confidence | Integer | Confidence score (0–100) for the extracted father's name |
ocr_fields[].dob | Object | Extracted date of birth |
ocr_fields[].dob.value | String | The extracted date of birth in DD/MM/YYYY format |
ocr_fields[].dob.confidence | Integer | Confidence score (0–100) for the extracted date of birth |
{
"data": {
"client_id": "secure_document_ocr_wuFcsieHGuSgafhjhohv",
"image_type": "pan",
"ocr_response": {
"ocr_fields": [
{
"document_type": "pan",
"pan_number": {
"value": "ABCPD1234E",
"confidence": 99
},
"full_name": {
"value": "Ram Kumar",
"confidence": 98
},
"father_name": {
"value": "Rajendra Kumar Singh",
"confidence": 97
},
"dob": {
"value": "01/01/2001",
"confidence": 99
}
}
]
}
},
"status_code": 200,
"success": true,
"message": null,
"message_code": "success"
}{
"data": null,
"status_code": 401,
"success": false,
"message": "Authentication credentials were not provided or are invalid.",
"message_code": "unauthorized"
}Authorization header is missing, malformed, or contains an expired/invalid JWT token. Ensure you are using the correct token for the target environment (sandbox vs. production).image_type parameter is set correctly.client_id returned in each response, to support audit and compliance requirements. Ensure logs themselves are stored securely with restricted access.curl --location 'https://kyc-api.surepass.app/api/v1/ocr/secure-document-ocr' \
--header 'Authorization: Bearer <token>' \
--form 'file=@""' \
--form 'image_type="aadhaar"' \
--form 'password="123456"'{
"data": {
"client_id": "secure_document_ocr_wpXWyuMptqwyZlTripwr",
"image_type": "aadhaar",
"ocr_response": {
"ocr_fields": [
{
"document_type": "aadhaar_front_bottom",
"full_name": {
"value": "Rajiv Talwar",
"confidence": 93
},
"gender": {
"value": "M",
"confidence": 91
},
"mother_name": {
"value": "",
"confidence": 0
},
"father_name": {
"value": "",
"confidence": 0
},
"dob": {
"value": "1994-04-08",
"confidence": 94,
"yob": false
},
"aadhaar_number": {
"value": "123456789012",
"confidence": 91,
"is_masked": false,
"input_validation": false
},
"image_url": null,
"uniqueness_id": "c038d592851976e720a6eed7e577074f131cbb208a7462b948c7aaccdc747b20"
},
{
"document_type": "aadhaar_back",
"address": {
"value": "S/O: Ram Talwar, Connaught Place, New Delhi, Delhi, India, 110001",
"confidence": 91,
"first_line": "",
"second_line": "",
"locality": "",
"landmark": "",
"house_number": "Connaught Place, New Delhi, Delhi, India",
"district": "New Delhi",
"city": "Connaught Place",
"state": "Delhi",
"country": "India",
"zip": "110001"
},
"zip": {
"value": "110001",
"confidence": 91
},
"care_of": {
"value": "Ram Talwar",
"confidence": 91,
"relation": "father"
},
"aadhaar_number": {
"value": "123456789012",
"confidence": 92,
"is_masked": false,
"input_validation": false
},
"image_url": null
}
]
}
},
"status_code": 200,
"success": true,
"message": null,
"message_code": "success"
}