Peleza β€” Trust built on data
Document Verification
On this page

Document Analysis

Analyze an uploaded government-issued ID or passport image, extract structured fields, and return verification results.

Request

POST/api/v1/document/analysis
{{baseUrl}}/api/v1/document/analysis
HeaderTypeDescription
AuthorizationstringBearer YOUR_ACCESS_TOKEN from the OAuth client-credentials flow
Content-Typestringapplication/json

Body Parameters

ParameterTypeDescriptionRequired
image_frontstringBase64 or URL of the document frontrequired
image_backstringBase64 or URL of the document backoptional
doc_typestringid_card | passport | drivers_licenseoptional

Response

200 OKSample dataExample response
{
  "success": true,
  "response_code": 200,
  "message": "Document analysis completed",
  "data": {
    "status": "success",
    "doc_type": "id_card",
    "extracted": {
      "full_name": "Jane Doe",
      "id_number": "1028845317",
      "dob": "1990-01-15"
    },
    "confidence": 0.97
  },
  "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

Response Fields

FieldTypeDescription
successbooleanWhether the request succeeded
response_codenumberApplication response code (typically mirrors HTTP)
messagestringHuman-readable status message
dataobjectPayload for the verified resource
request_idstringUUID for support and audit trails

Set {{baseUrl}} to https://api.peleza.com (production) or https://sandbox.peleza.com (sandbox). Authenticated calls need a Bearer token from POST /api/v1/oauth/token.