> ## 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.

# Evaluate an activity

> Submit answers and get a Submission back.

## Path parameters

<ParamField path="id" type="string" required />

## Body

<ParamField body="answers" type="Answer[]" required>
  One entry per question, or one entry total for single-question
  activities like `short_answer`.
</ParamField>

<ParamField body="student_id" type="string">
  Required when called with a workspace key. Optional with a session key
  (it's inferred from the key's subject).
</ParamField>

## Examples

<CodeGroup>
  ```ts TypeScript theme={null}
  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);
  ```

  ```php PHP theme={null}
  $submission = $hk->activities->evaluate('act_123', [
      'answers' => [
          ['question_id' => 'que_1', 'value' => true],
          ['question_id' => 'que_2', 'value' => 'c'],
      ],
  ]);

  echo $submission->grade_ai;
  ```
</CodeGroup>

## Returns

A [Submission](/api-reference/submissions/object). 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.
