POST /api/v1/cats/attempt/{attempt}/grade

Triggers automated grading for a CAT attempt. STRUCTURED questions are auto-graded; UNSTRUCTURED questions are evaluated via AI. Authentic responses (below admin-set threshold) get an auto-awarded score; others are left for manual review.

Path parameters

  • attempt string Required

    Attempt ID to grade

Responses

  • 200 application/json

    Attempt graded successfully

  • 400

    Attempt already graded or cannot be graded

  • 404

    Attempt not found

POST /api/v1/cats/attempt/{attempt}/grade
curl \
 --request POST 'https://api.echoplain.social/api/v1/cats/attempt/789e0123-e89b-12d3-a456-426614174002/grade'
Response examples (200)
{
  "grading": {
    "gradedAt": "2025-10-15T10:46:00.000Z",
    "attemptId": "789e0123-e89b-12d3-a456-426614174002",
    "breakdown": [
      {
        "feedback": "Correct answer",
        "maxMarks": 2,
        "questionId": "456e7890-e89b-12d3-a456-426614174001",
        "awardedMarks": 2
      }
    ],
    "percentage": 83.33,
    "totalMarks": 30,
    "scoredMarks": 25
  },
  "message": "Attempt graded successfully"
}