This is a Backend SDK method, not an HTTP endpoint. Call it from your server — never from the browser.
Install
Initialise
Signature
Parameters
Array of candidate objects. Must have at least one item.
Example
Your internal recruiter ID. You can pass this or
recruiterEmail — at least one is required. You may pass both.The recruiter’s email address. You can pass this or
recruiterId — at least one is required. You may pass both.Return value
A session token (JWT). Pass this directly to
AssessmentPortal.open({ token }) in your frontend. Do not cache or store it — request a fresh one every time.Error cases
| Condition | Error message |
|---|---|
Neither recruiterId nor recruiterEmail provided | Provide at least one of recruiterId or recruiterEmail — pass one or both |
users is an empty array / list | users must be a non-empty array |
name missing in single mode | name is required |
email missing in single mode | email is required |
| Invalid API key | HTTP 401 from SmartAI platform |
ASSESSMENT_API_KEY not set | Missing API key |

