Skip to Content
Testhive CoreLMS Integration

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 example test.evaluation.completed)
  • X-Testhive-Delivery-Id — unique delivery ID
  • X-Testhive-Timestamp — Unix timestamp used in the signature
  • X-Testhive-Signaturesha256=<hex> HMAC of {timestamp}.{rawBody}

Compute HMAC-SHA256 with your webhook signing secret and compare to the header value.

Supported webhook events

EventWhen it fires
test.createdA test is scheduled
test.cancelledA test is cancelled
test.endedThe test availability window closes
test.submission.receivedA learner submits
test.evaluation.completedLLM 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