Verify Workloads with the VB-OS Node.js SDK
The top-level verification methods submit workloads to the VB-OS evaluation engine. All three accept a kwargs object whose fields are passed directly to the API using snake_case field names.
verify
Section titled “verify”Submit a single workload for evaluation. Returns the evaluation result with a verdict (ASSERT or DEFER).
const result = await client.verify({ project: 'my-project', environment: 'production', boundary_ref: 'kyc-boundary', workload: { applicant_age: 25, credit_score: 720, income_verified: 1, },});
console.log(result.decision); // "ASSERT" or "DEFER"verifyBatch
Section titled “verifyBatch”Submit multiple workloads in a single request.
const result = await client.verifyBatch({ project: 'my-project', environment: 'production', boundary_ref: 'kyc-boundary', workloads: [ { applicant_age: 25, credit_score: 720 }, { applicant_age: 17, credit_score: 580 }, ],});validate
Section titled “validate”Validate a workload against a boundary without recording an evaluation. Useful for testing boundary logic during development.
const result = await client.validate({ project: 'my-project', boundary_ref: 'kyc-boundary', workload: { applicant_age: 25, credit_score: 720, },});Field Names
Section titled “Field Names”All fields in the kwargs object use snake_case names. The SDK passes them directly to the API without transformation.
| Field | Type | Description |
|---|---|---|
project |
string |
Project slug or ID |
environment |
string |
Environment name |
boundary_ref |
string |
Boundary reference |
workload |
object |
Evidence fields (integer values) |
workloads |
object[] |
Array of workloads (batch only) |
metadata |
object |
Optional non-authoritative metadata |
