Skip to main content

Background Verification

The Background Verification (BGV) API suite lets you run structured verification workflows for candidates — covering education, employment, address, criminal records, and more.

STEP 1Create FormDefine checksSTEP 2Add CandidateForm ID → transactionIdSTEP 3SubmitVerificationsSTEP 4Receive WebhookAsync notificationSTEP 5Retrieve Results& Download Report

How It Works

1. Create a Form

A form defines which verification checks are required for a candidate. You configure this once and reuse the form for multiple candidates.

Create Form →

{
"name": "Engineering Hire",
"verifications": [
{ "name": "bgv-employment", "skipAllowed": false },
{ "name": "bgv-degree", "skipAllowed": true }
]
}

The response includes a _id (form ID) that you pass when adding a candidate.


2. Add a Candidate

Submit the candidate's basic information along with the form ID from Step 1. This creates a transaction and returns a transactionId.

Create Profile →


3. Upload Documents & Submit Verifications

For each check in the form, upload the relevant document using the File Upload API to get a fileUrl, then submit the verification details.

File Upload → · Education · Employment · Address · Criminal & Police


4. Receive Webhook Notifications

Once all verifications are completed, Trential sends a webhook notification to your configured endpoint. Configure a webhook once and it applies to all transactions.

Configure Webhook →


5. Retrieve Results & Download Report

When you receive the webhook, use the transactionId to fetch the verification data or download the final PDF report.

Transaction Info → · Verification Info → · Download Report →


Sequence of APIs

StepAPI
1Get Purpose (optional — call once to get the purpose ID for your use case)
2Create Form
3Create Profile (uses form ID)
4Upload File
5Initiate verifications — Education, Employment, Address, etc.
6Receive webhook (see below) — verification-completed or insufficiency-raised
6a(if insufficiency) Resolve Insufficiency and wait for insufficiency-resolved webhook
7Transaction Info / Verification Info
8Download Report

Configuring Webhooks

Register a URL where Trential will POST a notification when a transaction is completed.

Endpoint: POST https://api.trential.dev/verification/api/1.0/webhook-config

Try it out →

Request

{
"endpoint": "https://your-server.com/webhook",
"apiKey": "your-shared-secret",
"description": "BGV completion notifications"
}
FieldRequiredDescription
endpointYesThe URL Trential will POST the notification to
apiKeyYesA secret string you choose. Trential sends it back in the x-webhook-key header so you can verify the request is genuine.
descriptionNoA label for this webhook configuration

Webhook Payloads

Trential POSTs to your endpoint with Content-Type: application/json. There are two payload shapes depending on scope.

Transaction-level event

Fired when the overall transaction changes state (e.g. all verifications complete).

{
"transactionId": "664758ec4c1572facafdafa0",
"orgId": "65940bdb9b271d7e123a90cc",
"action": "transaction-completed",
"verificationReportUrl": "https://storage.googleapis.com/trential-reports/...",
"scope": "transaction"
}
FieldDescription
transactionIdThe BGV transaction ID
orgIdYour organisation ID
actiontransaction-completed · transaction-closed · evaluation-completed
verificationReportUrlSigned URL to the full PDF report (present when action is transaction-completed)
scopeAlways transaction for this shape

Verification-level event

Fired each time an individual verification within the transaction changes state.

{
"transactionId": "664758ec4c1572facafdafa0",
"verificationId": "b8017572-06b6-46d5-8155-a36006f75f23",
"orgId": "65940bdb9b271d7e123a90cc",
"action": "verification-completed",
"scope": "verification"
}
FieldDescription
transactionIdThe BGV transaction ID
verificationIdThe sub-type ID of the specific verification
orgIdYour organisation ID
actionverification-started · verification-completed · verification-failed · insufficiency-raised · insufficiency-resolved · verification-closed
scopeAlways verification for this shape

Verifying Webhook Payloads

Every webhook request from Trential includes:

x-webhook-key: your-shared-secret

Validate this header against the apiKey you registered before processing the payload.

Managing Webhooks

ActionAPI
List all webhooksFetch Webhook Configurations
Update a webhookUpdate Webhook Configuration
Delete a webhookDelete Webhook Configuration