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:| Event | When it fires |
|---|---|
assessment.sent | A recruiter sends an assessment to candidates (webhook mode) |
assessment.completed | A candidate submits the exam |
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 | Type | What it tells you |
|---|---|---|
eventId | string | Unique ID for this event — use as your DB primary key |
event | string | Always "assessment.completed" |
assessmentId | string | Which assessment template was used |
candidateId | string | SmartAI’s internal ID for the candidate |
candidateName | string | Candidate’s full name |
candidateEmail | string | Candidate’s email — use to match them in your DB |
assessmentName | string | Name of the assessment |
jobTitle | string | Role the assessment was for |
score | number | How many marks the candidate got |
totalMarks | number | Total marks available (always 100) |
passMarks | number | Minimum marks needed to pass |
passed | boolean | true if score ≥ passMarks |
status | string | completed / timeout / abandoned |
submittedAt | string | When the candidate submitted |
durationMinutes | number | How long they took (in minutes) |
aiFeedback | string | AI-written summary of their performance |
reportUrl | string | Link to the full report page |
skills | string[] | Skills tested in this assessment |
questionAnswers | array | Every question + the candidate’s answer |
verification.imageUrl | string | Selfie taken at the start (identity check) |
proctoring | object | Cheating/integrity data |
recording.url | string | Video recording of the session |
storedAt | string | When SmartAI put this in the queue |
Field-by-field breakdown
Identity fields
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.The type of event. Right now this is always
"assessment.completed" — every event means a candidate finished (or was timed out from) an assessment.The ID of the assessment template that was used. One template can be used for many candidates, so this is not unique per candidate.
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
The candidate’s full name, exactly as you passed it when creating the session.In your code:
c.name ?? c.fullName ?? ''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
The display name of the assessment template, e.g.
"Full Stack Developer Assessment".The job role this assessment was created for, e.g.
"Senior Software Engineer".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.The number of marks the candidate scored. Always between
0 and totalMarks.Example: 78The total marks available. Always
100.The minimum score needed to pass. Configured when the assessment was created.Example:
60true if score >= passMarks, false otherwise.This is pre-calculated for you — you don’t need to compare score and passMarks yourself.How the assessment ended.
| Value | What it means | Did we get a score? |
|---|---|---|
completed | Candidate submitted normally | ✅ Yes |
timeout | Time ran out — auto-submitted | ✅ Yes (partial) |
abandoned | Candidate closed without submitting | ❌ No score |
Timing fields
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()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.When SmartAI put this event in the queue (slightly after
submittedAt). Usually a few seconds difference.AI feedback & report
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.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"
