Batch Verification
Process multiple verifications efficiently using batch operations. Ideal for onboarding large user groups.
Approach
VerifyHQ doesn't expose a single batch endpoint — instead, use concurrent requests with idempotency keys for safe, parallelized batch processing:
Node.js Batch Examplejavascript
import { VerifyHQ } from '@verifyhq/node';
import { v4 as uuid } from 'uuid';
const client = new VerifyHQ({ apiKey: process.env.VERIFYHQ_API_KEY });
const users = ['user_001', 'user_002', 'user_003', /* ... */];
// Process in batches of 10 (respect rate limits)
const BATCH_SIZE = 10;
for (let i = 0; i < users.length; i += BATCH_SIZE) {
const batch = users.slice(i, i + BATCH_SIZE);
const results = await Promise.allSettled(
batch.map(userId =>
client.identity.start(
{ userId, tier: 'BASIC' },
{ idempotencyKey: uuid() },
)
)
);
results.forEach((r, idx) => {
if (r.status === 'fulfilled') {
console.log(`✓ ${batch[idx]}: ${r.value.id}`);
} else {
console.error(`✗ ${batch[idx]}: ${r.reason.message}`);
}
});
// Wait 1s between batches to respect rate limits
await new Promise(r => setTimeout(r, 1000));
}For enterprise batch processing (10,000+ users), contact sales for dedicated throughput allocation.
Batch Guidelines
| Parameter | Type | Description |
|---|---|---|
Concurrency | guideline | Max 10 concurrent requests recommended |
Idempotency | guideline | Always use idempotency keys for safe retries |
Rate Limits | guideline | Stay within your plan rate limit |
Error Handling | guideline | Use Promise.allSettled to handle partial failures |