LMS Integration
Testhive Core provides a REST-first API for LMS bridges. Use a service API key and the endpoints below to generate content, schedule tests, pull grades, and receive event notifications.
https://testhiveapp.com/api/core/v1
Typical workflow
Generate a question set
Use the wizard endpoints to create AI-generated content, or reference an existing set with GET /api/core/v1/questionsets.
Schedule a test
POST /api/core/v1/tests accepts learner emails, a
question set ID, and availability window.
Receive events
Register POST /api/core/v1/webhooks on your LMS bridge to get notified when tests are created, submissions arrive, evaluations complete, or a test window ends.
Pull results
GET /api/core/v1/tests/{testId}/results returns
per-learner scores and submission status.
Create a test
curl -s -X POST \
-H "Authorization: Bearer sk-YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"name": "Chapter 3 Quiz",
"questionset": "YOUR_QUESTIONSET_ID",
"starttime": 1739956078,
"endtime": 1739959678,
"invitees": [{ "email": "[email protected]" }]
}' \
https://testhiveapp.com/api/core/v1/tests
Register a webhook
curl -s -X POST \
-H "Authorization: Bearer sk-YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-lms-bridge.example/hooks/testhive",
"events": ["test.created", "test.submission.received", "test.evaluation.completed"]
}' \
https://testhiveapp.com/api/core/v1/webhooks
Save the secret from the response — it is shown only once.
Verify webhook signatures
Each delivery is a POST with JSON body and headers:
X-Testhive-Event— event name (for exampletest.evaluation.completed)X-Testhive-Delivery-Id— unique delivery IDX-Testhive-Timestamp— Unix timestamp used in the signatureX-Testhive-Signature—sha256=<hex>HMAC of{timestamp}.{rawBody}
Compute HMAC-SHA256 with your webhook signing secret and compare to the header value.
Supported webhook events
| Event | When it fires |
|---|---|
test.created | A test is scheduled |
test.cancelled | A test is cancelled |
test.ended | The test availability window closes |
test.submission.received | A learner submits |
test.evaluation.completed | LLM evaluation finishes for descriptive/assignment tests |
Fetch results
curl -s \
-H "Authorization: Bearer sk-YOUR_KEY_HERE" \
https://testhiveapp.com/api/core/v1/tests/YOUR_TEST_ID/results
Related
- Service API Keys
- API Playground — interactive reference for all Core endpoints