{"openapi":"3.1.0","info":{"title":"Qwiktest API","version":"2026-11-24","description":"Server-to-server API. Send `Authorization: Bearer <key>` (qt_live_… or qt_test_…). Keys are made on the Developers page. Never use a key in a browser or app. Sandbox keys see only sandbox tests."},"servers":[{"url":"https://open.qwiktest.in"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Scopes: tests:read, launch:write, attempts:read, results:answers, candidates:read, candidates:write, candidates:delete, webhooks:manage, analytics:read"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INVALID_REQUEST","UNKNOWN_FIELD","UNAUTHORIZED","PLAN_REQUIRED","FORBIDDEN_SCOPE","IP_NOT_ALLOWED","API_DISABLED","LIVE_KEY_IN_BROWSER","NOT_FOUND","METHOD_NOT_ALLOWED","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","PAYLOAD_TOO_LARGE","UNSUPPORTED_MEDIA_TYPE","RATE_LIMITED","MONTHLY_CAP_REACHED","RETURN_URL_NOT_ALLOWED","LAUNCH_NOT_ALLOWED","CANDIDATE_REMOVED","CANDIDATE_CONFLICT","TEST_NOT_AVAILABLE","INTERNAL","UNAVAILABLE"]},"message":{"type":"string"},"request_id":{"type":"string"},"limit":{"type":"string"}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"WhoAmI":{"type":"object","properties":{"key":{"type":"object","properties":{"id":{"type":"string"},"key_id":{"type":"string"},"name":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"scopes":{"type":"array","items":{"type":"string"}},"expires_at":{"type":["string","null"]}},"required":["id","key_id","name","mode","scopes","expires_at"],"additionalProperties":false},"workspace":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false},"limits":{"type":"object","properties":{"requests_per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"launches_per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"requests_monthly":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["requests_per_minute","launches_per_minute","requests_monthly"],"additionalProperties":false}},"required":["key","workspace","limits"],"additionalProperties":false},"Test":{"type":"object","properties":{"test_id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","published","archived"]},"sandbox":{"type":"boolean"},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timer":{"type":"string","enum":["whole_test","per_question"]},"total_questions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_marks":{"type":"number"},"negative_marking":{"type":["number","null"]},"negative_marking_varies":{"type":"boolean"},"attempts_allowed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"starts_at":{"type":["string","null"]},"ends_at":{"type":["string","null"]},"sections":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"questions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"counted_questions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"marks":{"type":"number"},"rule":{"type":"string","enum":["all","choice","practice"]},"answer_limit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["name","questions","counted_questions","marks","rule","answer_limit"],"additionalProperties":false}},"updated_at":{"type":"string"}},"required":["test_id","name","status","sandbox","duration_minutes","timer","total_questions","max_marks","negative_marking","negative_marking_varies","attempts_allowed","starts_at","ends_at","sections","updated_at"],"additionalProperties":false},"TestList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"test_id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","published","archived"]},"sandbox":{"type":"boolean"},"duration_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_questions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated_at":{"type":"string"}},"required":["test_id","name","status","sandbox","duration_minutes","total_questions","updated_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"LaunchRequest":{"type":"object","properties":{"external_user_id":{"type":"string","pattern":"^[A-Za-z0-9_.:@-]{1,128}$"},"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":20},"test_id":{"type":"string","pattern":"^tst_[0-9a-z]{32}$"},"return_url":{"type":"string","maxLength":2000},"external_ref":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,100}$"},"expires_in_seconds":{"default":120,"type":"integer","minimum":30,"maximum":300}},"required":["external_user_id","name","email","test_id"],"additionalProperties":false},"Launch":{"type":"object","properties":{"launch_id":{"type":"string"},"launch_url":{"type":"string"},"expires_at":{"type":"string"},"test_id":{"type":"string"},"candidate_id":{"type":"string"},"external_ref":{"type":["string","null"]}},"required":["launch_id","launch_url","expires_at","test_id","candidate_id","external_ref"],"additionalProperties":false},"LaunchStatus":{"type":"object","properties":{"launch_id":{"type":"string"},"status":{"type":"string","enum":["pending","used","expired"]},"test_id":{"type":"string"},"candidate_id":{"type":"string"},"external_ref":{"type":["string","null"]},"created_at":{"type":"string"},"expires_at":{"type":"string"},"used_at":{"type":["string","null"]}},"required":["launch_id","status","test_id","candidate_id","external_ref","created_at","expires_at","used_at"],"additionalProperties":false},"Attempt":{"type":"object","properties":{"attempt_id":{"type":"string"},"attempt_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["in_progress","submitted"]},"external_user_id":{"type":["string","null"]},"external_ref":{"type":["string","null"]},"candidate_id":{"type":"string"},"test_id":{"type":"string"},"started_at":{"type":["string","null"]},"submitted_at":{"type":["string","null"]},"submit_reason":{"anyOf":[{"type":"string","enum":["manual","time_up","closed"]},{"type":"null"}]},"time_used_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"score":{"type":["number","null"]},"max_score":{"type":["number","null"]},"correct":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"wrong":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sections":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"score":{"type":"number"},"max":{"type":"number"},"correct":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"wrong":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","score","max","correct","wrong","skipped","time_seconds"],"additionalProperties":false}},"questions":{"type":"array","items":{"type":"object","properties":{"q_no":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"section":{"type":"string"},"topic":{"type":["string","null"]},"difficulty":{"type":["string","null"]},"result":{"type":"string","enum":["correct","partial","wrong","skipped"]},"marks":{"type":"number"},"time_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"chosen":{"type":["string","null"]},"answer":{"type":["string","null"]}},"required":["q_no","section","topic","difficulty","result","marks","time_seconds"],"additionalProperties":false}},"rank":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"total_candidates":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"percentile":{"type":["number","null"]},"rank_provisional":{"type":"boolean"},"counted":{"type":"boolean"}},"required":["attempt_id","attempt_number","status","external_user_id","external_ref","candidate_id","test_id","started_at","submitted_at","submit_reason","time_used_seconds","score","max_score","correct","wrong","skipped","sections","questions","rank","total_candidates","percentile","rank_provisional","counted"],"additionalProperties":false},"AttemptList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"attempt_id":{"type":"string"},"attempt_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["in_progress","submitted"]},"external_user_id":{"type":["string","null"]},"external_ref":{"type":["string","null"]},"candidate_id":{"type":"string"},"test_id":{"type":"string"},"started_at":{"type":["string","null"]},"submitted_at":{"type":["string","null"]},"submit_reason":{"anyOf":[{"type":"string","enum":["manual","time_up","closed"]},{"type":"null"}]},"time_used_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"score":{"type":["number","null"]},"max_score":{"type":["number","null"]},"correct":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"wrong":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sections":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"score":{"type":"number"},"max":{"type":"number"},"correct":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"wrong":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","score","max","correct","wrong","skipped","time_seconds"],"additionalProperties":false}},"questions":{"type":"array","items":{"type":"object","properties":{"q_no":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"section":{"type":"string"},"topic":{"type":["string","null"]},"difficulty":{"type":["string","null"]},"result":{"type":"string","enum":["correct","partial","wrong","skipped"]},"marks":{"type":"number"},"time_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"chosen":{"type":["string","null"]},"answer":{"type":["string","null"]}},"required":["q_no","section","topic","difficulty","result","marks","time_seconds"],"additionalProperties":false}},"rank":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"total_candidates":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"percentile":{"type":["number","null"]},"rank_provisional":{"type":"boolean"},"counted":{"type":"boolean"}},"required":["attempt_id","attempt_number","status","external_user_id","external_ref","candidate_id","test_id","started_at","submitted_at","submit_reason","time_used_seconds","score","max_score","correct","wrong","skipped","sections","questions","rank","total_candidates","percentile","rank_provisional","counted"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"WebhookEvent":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["attempt.started","attempt.submitted","attempt.rescored","ping"]},"created":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"data":{"anyOf":[{"type":"object","properties":{"attempt_id":{"type":"string"},"attempt_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["in_progress","submitted"]},"external_user_id":{"type":["string","null"]},"external_ref":{"type":["string","null"]},"candidate_id":{"type":"string"},"test_id":{"type":"string"},"started_at":{"type":["string","null"]},"submitted_at":{"type":["string","null"]},"submit_reason":{"anyOf":[{"type":"string","enum":["manual","time_up","closed"]},{"type":"null"}]},"time_used_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"score":{"type":["number","null"]},"max_score":{"type":["number","null"]},"correct":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"wrong":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sections":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"score":{"type":"number"},"max":{"type":"number"},"correct":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"wrong":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"time_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","score","max","correct","wrong","skipped","time_seconds"],"additionalProperties":false}},"questions":{"type":"array","items":{"type":"object","properties":{"q_no":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"section":{"type":"string"},"topic":{"type":["string","null"]},"difficulty":{"type":["string","null"]},"result":{"type":"string","enum":["correct","partial","wrong","skipped"]},"marks":{"type":"number"},"time_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"chosen":{"type":["string","null"]},"answer":{"type":["string","null"]}},"required":["q_no","section","topic","difficulty","result","marks","time_seconds"],"additionalProperties":false}},"rank":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"total_candidates":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"percentile":{"type":["number","null"]},"rank_provisional":{"type":"boolean"},"counted":{"type":"boolean"}},"required":["attempt_id","attempt_number","status","external_user_id","external_ref","candidate_id","test_id","started_at","submitted_at","submit_reason","time_used_seconds","score","max_score","correct","wrong","skipped","sections","questions","rank","total_candidates","percentile","rank_provisional","counted"],"additionalProperties":false},{"type":"null"}]}},"required":["id","type","created","mode","data"],"additionalProperties":false}}},"paths":{"/v1/health":{"get":{"summary":"Is the API up","tags":["Basics"],"description":"No key needed.","responses":{"200":{"description":"OK"}}}},"/v1/me":{"get":{"summary":"The key you are using, its workspace, scopes and limits","tags":["Basics"],"description":"Any scope may call it. Use it to check a key works.","security":[{"apiKey":[]}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this account."},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the minute bucket is full again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhoAmI"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN_SCOPE, IP_NOT_ALLOWED, API_DISABLED, LIVE_KEY_IN_BROWSER, LAUNCH_NOT_ALLOWED, CANDIDATE_REMOVED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, MONTHLY_CAP_REACHED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tests":{"get":{"summary":"List tests (newest change first)","tags":["Tests"],"security":[{"apiKey":[]}],"x-required-scope":"tests:read","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["draft","published","archived"]},"description":"Only tests in this state"},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only tests changed at or after this time, e.g. 2026-11-30T00:00:00Z"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"1–100, default 50"},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page"}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this account."},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the minute bucket is full again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestList"}}}},"400":{"description":"INVALID_REQUEST, UNKNOWN_FIELD, RETURN_URL_NOT_ALLOWED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN_SCOPE, IP_NOT_ALLOWED, API_DISABLED, LIVE_KEY_IN_BROWSER, LAUNCH_NOT_ALLOWED, CANDIDATE_REMOVED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, MONTHLY_CAP_REACHED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tests/{test_id}":{"get":{"summary":"One test: name, duration, sections, marks, negative marking","tags":["Tests"],"security":[{"apiKey":[]}],"x-required-scope":"tests:read","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","pattern":"^tst_[0-9a-z]{32}$"},"description":"tst_… from GET /v1/tests"}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this account."},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the minute bucket is full again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Test"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN_SCOPE, IP_NOT_ALLOWED, API_DISABLED, LIVE_KEY_IN_BROWSER, LAUNCH_NOT_ALLOWED, CANDIDATE_REMOVED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, MONTHLY_CAP_REACHED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/launches":{"post":{"summary":"Create a launch link that signs a student in","tags":["Launches"],"description":"Send an Idempotency-Key so a retry never makes two links. Open launch_url in a new tab within expires_at. The student lands in the test's lobby, already signed in. The same external_user_id is always the same student. return_url must be https on one of your allowed domains. Live keys can launch any published test, or only the tests the owner chose on the Developers page; sandbox keys only sandbox tests.","security":[{"apiKey":[]}],"x-required-scope":"launch:write","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"description":"Any unique value, 8–100 letters, digits or _ . : - (for example your order id). A retry with the same key and body gets the same link back for 24 hours"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchRequest"}}}},"responses":{"201":{"description":"Created","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this account."},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the minute bucket is full again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Launch"}}}},"400":{"description":"INVALID_REQUEST, UNKNOWN_FIELD, RETURN_URL_NOT_ALLOWED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN_SCOPE, IP_NOT_ALLOWED, API_DISABLED, LIVE_KEY_IN_BROWSER, LAUNCH_NOT_ALLOWED, CANDIDATE_REMOVED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"IDEMPOTENCY_CONFLICT, IDEMPOTENCY_IN_PROGRESS, CANDIDATE_CONFLICT, TEST_NOT_AVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, MONTHLY_CAP_REACHED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/launches/{launch_id}":{"get":{"summary":"Whether a launch link was used","tags":["Launches"],"security":[{"apiKey":[]}],"x-required-scope":"launch:write","parameters":[{"name":"launch_id","in":"path","required":true,"schema":{"type":"string","pattern":"^lch_[0-9a-z]{32}$"},"description":"lch_… from POST /v1/launches"}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this account."},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the minute bucket is full again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchStatus"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN_SCOPE, IP_NOT_ALLOWED, API_DISABLED, LIVE_KEY_IN_BROWSER, LAUNCH_NOT_ALLOWED, CANDIDATE_REMOVED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, MONTHLY_CAP_REACHED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/attempts":{"get":{"summary":"A student's finished attempts (newest first)","tags":["Attempts"],"description":"Only students your API signed in (by external_user_id). The same body as the attempt.submitted webhook. Chosen and correct answers only with the results:answers scope. Not counted against the monthly cap.","security":[{"apiKey":[]}],"x-required-scope":"attempts:read","parameters":[{"name":"external_user_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:@-]{1,128}$"},"description":"Your id for the student, as sent when launching"},{"name":"test_id","in":"query","schema":{"type":"string","pattern":"^tst_[0-9a-z]{32}$"},"description":"Only attempts at this test"},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Submitted at or after this time"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"1–100, default 20"},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page"}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this account."},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the minute bucket is full again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptList"}}}},"400":{"description":"INVALID_REQUEST, UNKNOWN_FIELD, RETURN_URL_NOT_ALLOWED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN_SCOPE, IP_NOT_ALLOWED, API_DISABLED, LIVE_KEY_IN_BROWSER, LAUNCH_NOT_ALLOWED, CANDIDATE_REMOVED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, MONTHLY_CAP_REACHED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/attempts/{attempt_id}":{"get":{"summary":"One attempt: score, sections, questions, rank","tags":["Attempts"],"description":"Rank moves while students are still finishing (rank_provisional). Not counted against the monthly cap.","security":[{"apiKey":[]}],"x-required-scope":"attempts:read","parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","pattern":"^att_[0-9a-z]{32}$"},"description":"att_… from a webhook or GET /v1/attempts"}],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this account."},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the minute bucket is full again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attempt"}}}},"401":{"description":"UNAUTHORIZED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"FORBIDDEN_SCOPE, IP_NOT_ALLOWED, API_DISABLED, LIVE_KEY_IN_BROWSER, LAUNCH_NOT_ALLOWED, CANDIDATE_REMOVED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED, MONTHLY_CAP_REACHED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"attempt.started":{"post":{"summary":"A student started a test","description":"Header Qwiktest-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")> (two v1 values for 24 h after a secret roll). Reject timestamps older than 5 minutes; dedupe by id. Answer 2xx within 10 seconds; otherwise we retry after 1 min, 5 min, 30 min, 2 h, 6 h and 12 h.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"attempt.submitted":{"post":{"summary":"A student finished (pressed Submit, time ran out, or closed by the server)","description":"Header Qwiktest-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")> (two v1 values for 24 h after a secret roll). Reject timestamps older than 5 minutes; dedupe by id. Answer 2xx within 10 seconds; otherwise we retry after 1 min, 5 min, 30 min, 2 h, 6 h and 12 h.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"attempt.rescored":{"post":{"summary":"Marks changed after an answer key fix","description":"Header Qwiktest-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")> (two v1 values for 24 h after a secret roll). Reject timestamps older than 5 minutes; dedupe by id. Answer 2xx within 10 seconds; otherwise we retry after 1 min, 5 min, 30 min, 2 h, 6 h and 12 h.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}}}}