Skip to main content
Cybr verifies CTF flags and records learner completion. Your server receives the results directly, so no callback endpoint is needed. Scores, points, and leaderboards belong to your platform.

What records completion

CTF labs: submit the flag

A lab with ctf: true completes when the learner submits the correct flag:
verdict is CORRECT_FLAG, INCORRECT_FLAG, or NOT_CTF. Flags are compared without case sensitivity. markCompleted() on a CTF lab throws invalid_request with backendCode FLAG_REQUIRED.

Other labs: mark completed

When your completion policy allows it, record completion:
markCompleted() resolves with { message: 'COMPLETED' } only after Cybr saves the record. Any other response throws. Each successful call creates another completion record, so check completed first, as above. An unknown lab ID throws not_found. Completion through markCompleted() is reported by your application. It does not prove that the learner solved anything.

Read completion

For one lab, read completed from the lab detail with the learner’s ID:
For a catalog page, read every lab the learner finished in one request:
completed does not say whether a flag or markCompleted() recorded it. Store your own verification result if you need that.

After a timeout

A timeout or network_error from markCompleted() or submitFlag() is ambiguous: the save may have happened. Check listCompleted() before you retry or report a failure.

Award points in your platform

If your platform awards points or badges, deduplicate in your own database, for example with a unique key on learner and lab. Award from those records, not from each response.