Skip to main content
Node 20 or newer. No dependencies.

Setup

The key is your secret key from the dashboard (Settings → API). Keep it on the server.

Your first verdict

Keep verification.id on your side: the API does not echo metadata back. waitFor polls until the verification is completed, expired or failed. It backs off on rate limits and gives up after fifteen minutes unless you pass timeoutMs.

Webhooks instead of waiting

Two events arrive. verification.created carries the ids and the status. verification.completed adds the verdict in its detailed form (label, score, reasonCode, one entry per check), the captures and the answers. For anything else, call verifications.get(event.verificationId).

Reading results

list filters: status, verdict, reasonCode, from, to, mode, metadata (matches the values you sent at creation), limit, cursor.

Templates

A template is a set of steps published once, with a permanent link.

One verification per row

Databases

Rows your templates compare against: a policy number the person types finds their row, and the expected location or object come from it.

Audits: a photo you already have

No link and no camera: you have the file, RIAL analyses it. With no device behind the photo there is no rial flag; you get the checks that tripped.
audits.run uploads, starts the analysis and waits. audits.create does the first two and returns at once; read the result later with verifications.get or a webhook.

Errors

RialError carries status, code and message. Reads retry on network errors, 429 and 5xx; writes never retry on their own.

Reference

Inputs and results use camelCase and are typed from the same OpenAPI document as the API reference, so they never drift. Exported types: Verification, LiveVerdict, AuditVerdict, Step, LinkTemplate, ImportJob, Database, VerificationEvent, PublicVerification, WebhookEvent, WebhookVerdict, and the inputs CreateVerificationInput, PublishTemplateInput, ListVerificationsFilters, AuditInput.