Skip to main content
POST
/
v1
/
activities
/
{id}
/
evaluate
Evaluate an activity
curl --request POST \
  --url https://api.example.com/v1/activities/{id}/evaluate \
  --header 'Content-Type: application/json' \
  --data '
{
  "answers": [
    {}
  ],
  "student_id": "<string>"
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.hawkings.education/llms.txt

Use this file to discover all available pages before exploring further.

Path parameters

id
string
required

Body

answers
Answer[]
required
One entry per question, or one entry total for single-question activities like short_answer.
student_id
string
Required when called with a workspace key. Optional with a session key (it’s inferred from the key’s subject).

Examples

const submission = await hk.activities.evaluate("act_123", {
  answers: [
    { question_id: "que_1", value: true },
    { question_id: "que_2", value: "c" },
  ],
});

console.log(submission.grade_ai);

Returns

A Submission. For interactive, inline activities, the submission is auto-graded synchronously when the question types support it (true_false, fill_blank, matching, etc.). For open-ended types, ai_status: "pending" until grading completes.