What is a webhook event?
Think of it like a notification your server receives after something happens on the SmartAI platform. There are two types of events your server will receive:
Both come from
client.getWebhookEvents() in the same queue. This page covers the assessment.completed event in detail. For assessment.sent see What Gets Stored in Redis.
When a candidate finishes (or times out on) an assessment, SmartAI puts a message in a queue. Your server picks it up by calling
client.getWebhookEvents(). That message is called a webhook event.
Quick reference — every field at a glance
Field-by-field breakdown
Identity fields
string
required
A unique ID that SmartAI generates for every event.Why it matters: Use this as your database primary key. If the same event gets delivered twice (which can happen if your server crashes mid-save), an upsert on
eventId will prevent duplicate records.string
required
The type of event. Right now this is always
"assessment.completed" — every event means a candidate finished (or was timed out from) an assessment.string
required
The ID of the assessment template that was used. One template can be used for many candidates, so this is not unique per candidate.
string
SmartAI’s internal ID for this candidate. Not the same as your own user ID — use
candidateEmail to match the candidate back to your database.Candidate info
string
The candidate’s full name, exactly as you passed it when creating the session.In your code:
c.name ?? c.fullName ?? ''string
required
The candidate’s email address. This is the most important field for matching — use it to find the person in your own user table.In your code:
c.email ?? ''Assessment info
string
The display name of the assessment template, e.g.
"Full Stack Developer Assessment".string
The job role this assessment was created for, e.g.
"Senior Software Engineer".string[]
The skills that were tested. Example:
["JavaScript", "React", "Node.js"].Result fields
These four fields are what you’ll use most often — they tell you the outcome.number
required
The number of marks the candidate scored. Always between
0 and totalMarks.Example: 78number
required
The total marks available. Always
100.number
required
The minimum score needed to pass. Configured when the assessment was created.Example:
60boolean
required
true if score >= passMarks, false otherwise.This is pre-calculated for you — you don’t need to compare score and passMarks yourself.string
required
How the assessment ended.
Timing fields
string
required
The exact date and time the candidate submitted, in ISO-8601 format.Example:
"2026-06-09T10:30:00.000Z"To display it in your UI: new Date(event.submittedAt).toLocaleString()number | null
How many minutes the candidate spent on the assessment.Example:
45 means they finished in 45 minutes.
null means timing wasn’t tracked for this session.string
When SmartAI put this event in the queue (slightly after
submittedAt). Usually a few seconds difference.AI feedback & report
string | null
A short paragraph written by AI summarising how the candidate performed.Example:
"Strong in algorithms; needs improvement in system design."This is null if AI feedback is not enabled for this assessment template.string
A direct URL to the full candidate report page on the SmartAI platform. Share this link with your recruiting team so they can review the detailed breakdown.Example:
"https://platform.smartai.app/reports/evt_01J9XYZABC"questionAnswers — per-question breakdown
This is an array with one entry per question. Use it if you want to show recruiters which specific questions the candidate got right or wrong.
array
verification — identity check
At the start of every assessment, the candidate takes a selfie. This confirms the right person is taking the test.
object
proctoring — integrity monitoring
The AI watches the candidate’s webcam throughout the test and flags suspicious behaviour. This object summarises what was detected.
object
recording — session video
The entire assessment session is recorded (webcam + screen). This is the strongest evidence when reviewing a suspicious session.
object

