Requires API key via Authorization: Bearer <api_key> header.
POST /api/v1/verify/batch
Submit up to 50 documents for async processing with webhook delivery.
Authentication
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| documents | string[] | Yes | Array of base64-encoded images (JPEG, PNG, or PDF). Max 50 per batch. Total request body must be under 4.5MB. |
| callbackUrl | string | Yes | HTTPS URL for webhook delivery. |
| callbackSecret | string | Yes | Secret for HMAC-SHA256 signing. Min 16 chars. |
Example Request
curl -X POST https://veriscor.io/api/v1/verify/batch \
-H "Authorization: Bearer vsk_live_550e8400..." \
-H "Content-Type: application/json" \
-d '{"documents":["<base64-1>","<base64-2>"],"callbackUrl":"https://your-app.com/webhooks/veriscor","callbackSecret":"your-secret-min-16-chars"}'Response (202 Accepted)
{
"data": {
"batchId": "550e8400-e29b-41d4-a716-446655440000",
"totalDocuments": 10,
"status": "processing"
}
}Webhook Payload
Each document result is delivered individually to your callback URL with these headers:
| Header | Description |
|---|---|
| X-Veriscor-Signature | sha256=<hmac> — verify with your callbackSecret |
| X-Veriscor-Delivery | Unique delivery ID for deduplication |
{
"batchId": "550e8400...",
"documentIndex": 0,
"result": {
"id": "...",
"forgeryScore": 0.12,
"confidence": "high",
"documentType": "passport",
"flags": [],
"latencyMs": 1847
}
}Retry Policy
Failed deliveries (non-2xx) are retried 3 times: 1 minute, 5 minutes, 30 minutes.