Skip to main content
POST
You build this endpoint. The path /assessment/session is whatever route you choose in your own app. Internally it calls client.createSession() from the Backend SDK and returns the token to your frontend.

How it fits in the flow


Environment variables required

Add these to your server’s .env file before this endpoint will work:
Never put these in your frontend .env. They belong on the server only. Your frontend uses NEXT_PUBLIC_ASSESSMENT_API_KEY (the public API key) separately just to tell the portal which environment to use — the secret key never leaves your server.

Request

Headers

string
required
Your app’s authentication token for the logged-in recruiter. Format: Bearer <jwt>. Protect this endpoint so only your own recruiter accounts can call it.
string
required
Must be application/json.

Body

array
required
Array of candidate objects to include in this assessment session. Must have at least one item.
string
Your internal recruiter ID. Pass this or recruiterEmail — at least one is required.
string
The recruiter’s email address. Pass this or recruiterId — at least one is required.

Response

boolean
true when the session was created successfully.
object


Common mistakes