POST /api/v1/verify/batch

Submit up to 50 documents for async processing with webhook delivery.

Authentication

Requires API key via Authorization: Bearer <api_key> header.

Request Body

FieldTypeRequiredDescription
documentsstring[]YesArray of base64-encoded images (JPEG, PNG, or PDF). Max 50 per batch. Total request body must be under 4.5MB.
callbackUrlstringYesHTTPS URL for webhook delivery.
callbackSecretstringYesSecret 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:

HeaderDescription
X-Veriscor-Signaturesha256=<hmac> — verify with your callbackSecret
X-Veriscor-DeliveryUnique 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.