Skip to main content

Sessions

A session represents one candidate’s attempt at one assessment. Sessions progress through a defined lifecycle from invitation to review. Session statuses: invited → setup → in_progress → submitted → scoring → scored → reviewed

List Sessions

integer
default:"20"
Results per page (1-100)
integer
default:"0"
Offset for pagination
string
Filter by assessment
string
Filter by candidate
string
Filter by status: invited, setup, in_progress, submitted, scoring, scored, reviewed

Get Session

Returns a single session with candidate and assessment metadata.
roleId is the role the candidate was invited for, or null when no role is recorded.

Change Session Role

Moves the candidate to a different role. The role must be linked to the session’s assessment, else the request returns 400. Send null to clear the role. Member and above, or an API key. Each change writes a session.role_changed entry to the audit log.
string | null
required
The new role id, or null.
role is null when the role was cleared.

Delete Session

Permanently deletes a session and all associated messages, events, and scores.
This action is irreversible.

Send Reminder

Emails the candidate a due-date reminder for an incomplete session (status invited, setup, or in_progress) and stamps reminderSentAt. Uses the session’s due date, falling back to the assessment’s. Fails with 400 when the candidate has already submitted or there is no due date to remind about, and with 429 when a reminder was already sent within the last 24 hours.

Bulk Send Reminder

Sends the reminder to every listed session in one request instead of one request per session. This route is dispatch-and-collect: it always returns 200, even when some items fail, and each item carries its own outcome. The single-session route above still exists for the per-row action.
string[]
required
Up to 500 session ids. Duplicates are removed before processing.

Change Deadline

Changes one candidate’s due date after invite. Send dueDate as a calendar day (YYYY-MM-DD); the server resolves it to end-of-day in the org timezone, the same rule the invite flows use. Send an empty or null dueDate to clear the deadline.
dueDate is null when the deadline was cleared.

Bulk Change Deadline

Changes the due date for every listed session in one request instead of one request per session, with the same dueDate rules as Change Deadline above. This route is dispatch-and-collect: it always returns 200, even when some items fail, and each item carries its own outcome. The single-session route above still exists for the per-row action.
string[]
required
Up to 500 session ids. Duplicates are removed before processing.
string
Calendar day (YYYY-MM-DD) or day and time (YYYY-MM-DDTHH:mm), applied to every session in the list. Empty or null clears the deadline for all of them.

Advance Phase

Advances a multi-phase assessment session to the next phase. Saves the current phase’s deliverable state and resets the timer for the next phase. Called by the candidate workspace when the candidate clicks “Next phase.”
This endpoint is authenticated via the candidate session token, not an API key.
object
The current phase’s deliverable content (email state, document state, etc.)
integer
default:"0"
Seconds remaining on the current phase timer when the candidate advanced

Checkpoint Phase

Saves the current phase’s deliverable state to the database without advancing or submitting. Enables interim saves so candidate work survives browser crashes and tab closes. The checkpoint is debounced client-side (3s) and fires after prompt edits and workflow runs.
This endpoint is authenticated via the candidate session token, not an API key.
object
required
The current phase’s deliverable content (workflow state, email state, etc.)
boolean
default:"false"
When true, also persist a point-in-time snapshot of the deliverable for the replay/history timeline, not just the latest interim save.

Reopen Session

Reopens a finished session at a chosen phase and gives the lost time back. Use it when a candidate loses the rest of an assessment to something outside their control, for example a sign-out that let the later phases expire empty. The phase clock does not start here. The chosen phase is put in a paused state, the session goes back to in_progress, and any score is marked superseded so a stale report cannot mail. The clock starts only when the candidate opens their link and resumes. That can be hours later, and no time is spent in between. Phases before fromPhaseIndex keep their work. The chosen phase and every phase after it are cleared, so the candidate does that work again.
Owner or admin only, and a human actor only. An API key has no role, so it gets 403. The action is gated at the sessions.reopen capability, the same tier as a permanent delete, because it discards work and supersedes a score a reviewer may already have read.
integer
required
Zero-based index of the phase to reopen at. Must be within the assessment’s phase list.
Send assessUrl to the candidate: The reopened session waits until they open it. Errors: 400 when fromPhaseIndex is not an integer of 0 or more, is out of range, or the assessment has no phases; 400 when the session has not started; 404 when the session is not in your organization.

Get Human Review

Returns the current human review of a session, or null when nobody has recorded one. For an organization whose use case is hiring, every submitted session must be reviewed by a person; the AI score is advisory and this record is the decision. Reviewer and above, or an API key.
reviewedBy is null when an API key recorded the decision or the member was later removed. Errors: 404 when the session is not in your organization.

Record Human Review

Marks a submitted session as reviewed and records the outcome: moving_on means the candidate is moving on to the next round, not_moving_on means they are not. Member and above, or an API key. Calling it again overwrites the decision on the session; every call appends a session.review_recorded entry to the organization’s audit log, which cannot be changed, so the full history of decisions is kept there. Until a decision is recorded, the member who invited the candidate receives review reminders by email (48 hours after submission, then every 3 days, at most 5) when the organization’s use case is hiring.
string
required
moving_on or not_moving_on.
string
The reason, up to 2000 characters. Required when decision is not_moving_on; optional otherwise. Trimmed; an empty string clears it.
The audit entry also records what the reviewer looked at before deciding (see Review Activity). For an API key every one of those is empty, and the entry says so.
Errors: 400 when decision is not one of the two values, note is not a string, note is empty on a not_moving_on decision, or the candidate has not submitted yet; 403 for a reviewer-tier member or a candidate; 404 when the session is not in your organization.

Review attestations

Some organizations record their hiring decision in their own ATS. When Gradient turns on review attestations for your organization, these two endpoints do not use decision. A reviewer records two independent facts: the session is reviewed, and its results are entered into the ATS. The body of PUT is { "reviewed"?: boolean, "atsEntered"?: boolean, "note"?: string }. Send at least one field. A field that you do not send stays as it is. Each change to reviewed or note appends a session.review_recorded audit entry, and each change to atsEntered appends a session.ats_entry_recorded audit entry. Both endpoints return { reviewedAt, reviewedBy, atsEnteredAt, atsEnteredBy, note, atsName }, where a null time means that the box is not checked. Review reminders stop when reviewed is set.

Review Activity

Records what a signed-in member looks at on a session: the read-only workspace (Review work), the session replay, and the Score Breakdown tab. When a review outcome is recorded, the audit entry stores a summary of it: when the work and the replay were first opened, how long each was visible, and whether the score was seen before the work.
Reports that the signed-in member has a review surface open. The app sends it once when the surface opens and then every 30 seconds while the tab is visible. Each heartbeat credits the time since the last one, capped at 60 seconds, so a hidden tab earns nothing.
string
required
workspace, replay, or score.
Errors: 400 for an unknown surface; 403 for an API key or a candidate; 404 when the session is not in your organization.

Resume Reopened Phase

Starts the clock on a phase that an admin reopened. Called by the candidate workspace when the candidate clicks Resume.
This endpoint is authenticated via the candidate session token, not an API key. It is the only route that can start a paused clock, so an admin who opens the review render never spends the candidate’s minutes.
Safe to call more than once. If the clock is already running, the call changes nothing and returns the running clock, so a double-click, a reload, or a second tab cannot restart the phase.
timeRemaining is in seconds.

Get Deliverable Versions

Returns every saved version of the session’s deliverable, oldest first. The deliverable holds one document per phase, so a draft the candidate replaces leaves no trace in the submitted state. This endpoint reads the deliverable_snapshot events behind it, which record the full deliverable about every 15 seconds and only when it changed. Without versionId the response lists the versions and their metadata, with no content. Supply versionId to read one version’s full state. Content is split out because one phase can hold hundreds of versions of a whole document. toolCallsSince lists the AI’s deliverable-writing tool calls recorded between the previous version and this one. It is an observation, not a statement about who wrote the version: the candidate can type in the same window, and a tool call can fail.
string
Read one version’s full state instead of the list. The id comes from a row of the list.

Download Session Package

Downloads one session as a zip file (Content-Type: application/zip, Content-Disposition: attachment). The zip contains:
  • Each submitted deliverable as a file. A docx phase and an email phase become a .docx. An xlsx or pptx phase keeps its own file type.
  • The candidate’s chat with the AI agent, as a .docx. Tool calls, skill use, and connector queries show as marker lines.
  • The scores, as an .xlsx with three tabs. Overview has the candidate, the submit time, the time taken, the total score and level, the assessment summary, and one row per category and sub-dimension with score, level, and summary. Behaviors has one row per judged behavior: category, sub-category, question, weight, verdict, evidence, and judge rationale. Priority Skills has the evidence-only findings. It has no score.
Available only for a session scored on rubric v7. Any other session gets 400. Org-scoped; admin or API-key auth (read tier). The scores come from the same projections as the candidate review page, so the workbook and the page agree. Each export writes a candidate.data_exported entry to the organization’s audit log. The log keeps one entry per caller, candidate and action per hour.

Record Session Chunk

Appends one flushed batch of rrweb DOM-recording events (cursor, clicks, scroll, typing) as an ordered chunk, streamed from the candidate workspace every 5s. Fire-and-forget — a dropped chunk never surfaces to the candidate.
This endpoint is authenticated via the candidate session token, not an API key.
array
required
Batch of rrweb events for this chunk
integer
required
Client-assigned monotonic chunk sequence number (0-based, incremented once per flush)
string
required
ISO timestamp of the first event in the batch
string
required
ISO timestamp of the last event in the batch

Record Candidate Survey

Records the candidate’s answers to the optional survey after they submit. The stored response has the org and the assessment, but not the session or the candidate. Each session can answer one time.
This endpoint is authenticated via the candidate session token, not an API key.
object
required
Answers keyed by question id. Each rating question must have a whole number from 1 to 5. The improvement text question is optional and has a limit of 2000 characters. The API ignores unknown ids.
The request fails with 400 when the answers are not valid, and with 403 when the org has not turned on the survey. It fails with 409 when the session is not submitted or the survey is already answered.

Get Session Recording

Returns the replay manifest for a session’s rrweb screen recording (cursor, clicks, scroll, typing), used by the staff replay player. Each chunk is a signed Storage URL, valid for one hour, to a JSON array of rrweb events. The player fetches the chunks in parallel and plays them in the listed order. Only the task phase is included: the Explore sandbox is not recorded, and older Explore chunks are left out. startedMs is the task start. hasRecording is false when the session has no task-phase recording.

Preview Feedback Report

Admin-only preview of the candidate feedback report — the same data the candidate sees at their /assess/:token/feedback link, rendered on the candidate detail page. Unlike the candidate-facing route, this does not gate on release: it’s available as soon as the session is scored, whether or not feedback has actually been released to the candidate. Read-only; never sends anything or changes release state.
Exactly one of v7 and legacyView is set. A v7 score has the v7 report content in v7. A score from a retired scoring version has its frozen, read-only breakdown in legacyView.The release object mirrors the eligibility signals the release cron uses, so the Feedback tab can explain why a scored session’s feedback hasn’t gone out yet.

Preview Feedback Email

Admin-only preview of the candidate feedback email — builds the exact subject and HTML sendFeedbackEmail would send (same template, same score-derived content), but returns it as JSON instead of sending. Never calls the email provider.