Skip to main content
Every request on this page requires a Bearer API key.

Registration endpoints

Parameters

Example request

Example response

This request is safe to retry. Participants who are already registered are not registered twice; they are reported in already_registered instead. Every new registration sends an exam_participant.registered webhook.When a participant is registered:
  • The participant gets a participant code (participant_code) and one result record for each test in the exam.
  • In a multi-level exam, only the tests in the first level are active straight away. Tests in later levels open once the previous level is finished.
  • If the exam uses automatic session assignment (is_auto_assign_session: true), the participant is placed in the earliest-created session of each test. Otherwise, an admin must assign the participant to a session in the admin panel before the participant can take the test. Until then, the access link reports locked_reason: "no_session".
An exam that is already locked (is_locked: true) rejects registration with status 409. Participant IDs that are not found in the project are reported in rejected, for example { "participant_id": 999, "reason": "Peserta tidak ditemukan pada projek ini." }.

Parameters

Example request

Example response

Status 201.
The response includes results: one result record for each test in the exam. Each item has the same structure as in the Exam Results API.

Parameters

Example request

Example response

The request is rejected with status 409 if the participant has already finished one of the tests or already has a score in this exam. Cancelling deletes the participant code and all of the participant’s test data for that exam, then sends an exam_participant.unregistered webhook.

Parameters

Example request

Example response

Generates one link for each test in the exam. The link signs the participant in directly, without typing a password, and then opens the test preparation page.Link behaviour:
  • Each link can be used only once, and must be used before expires_at. The default validity is 1,440 minutes (24 hours), up to 10,080 minutes (7 days). A link that has already been used or has expired shows a message saying the link is no longer valid.
  • If the participant needs to sign in again, for example after closing the tab, switching devices or losing the connection, create a new link. A new link for a test in progress resumes the same attempt instead of starting over.
  • Links created earlier remain valid until they are used or expire.
  • exam_url is returned even when the test can’t be taken yet. Check can_start before redirecting the participant. A link for a test with can_start: false doesn’t open the test; the participant is sent to the CBT dashboard or gets a not-found page.
  • A participant can have only one active login session. Opening a link on another device ends the session on the previous device.
  • Inactive participants cannot sign in through a link. The link is still created, and the message in the response explains that the participant is inactive.
  • When return_url is sent, the Exam Completed page shows a Continue button that takes the participant to that URL once the last test of the attempt is finished. Without return_url, the page keeps its Back to Exam List button.
Access links are designed for a redirect flow from your application, for example a “Start Exam” button. Create the link at the moment the participant clicks the button, with a short expires_in_minutes (for example 5–15 minutes), then redirect the participant straight away. Don’t store links or send them by email or chat: some chat and email apps open links automatically to generate a preview, so the link is used up before the participant clicks it.

Parameters

Register the return_url domains in the Post-Exam Redirect Domains field under Application Settings → API Integration. Enter the domain name only, without https:// or a path, separated by commas, for example portal.smanusantara.example.com, ujian.smanusantara.example.com. Domains are matched exactly: registering smanusantara.example.com does not allow its subdomains, so register every subdomain you use. The port of a return_url is not part of the match.
locked_reason values:
  • finished — the test has already been completed.
  • unavailable — the exam is outside its schedule or archived, the participant’s registration is suspended or finished, or the test was rejected.
  • payment — the test is awaiting payment.
  • pending — the test’s level isn’t open yet, or the registration is still awaiting verification.
  • order — the tests must be taken in order and the previous test isn’t finished yet.
  • no_session — the participant hasn’t been assigned to a session yet, or the session has no question package.
  • no_questions — the session’s question package has no questions yet.
  • outside_session — the current time is outside the session schedule.
Status 404 is returned if the exam or participant is not found, or if the participant isn’t registered for the exam. Status 422 is returned if the exam has no tests yet, or if return_url doesn’t use https:// or its domain isn’t registered.

Example request

Example response