Creates an assignment submission. If responseText is provided, AI analysis is performed and an auto-score may be awarded when the authenticity score is below the admin-set threshold. File-only submissions are stored but not analyzed.
POST
/api/v1/assignment/{id}/submit
curl \
--request POST 'http://localhost:3500/api/v1/assignment/assignment-123/submit' \
--header "Content-Type: application/json" \
--data '{"responseText":"Implementation of merge sort and quicksort algorithms..."}'
Request examples
Text submission
{
"responseText": "Implementation of merge sort and quicksort algorithms..."
}
{
"fileUrl": "https://storage.example.com/submissions/algorithms.zip"
}
{
"fileUrl": "https://storage.example.com/submissions/project.zip",
"responseText": "See attached code files for implementation"
}
Response examples (201)
{
"message": "Assignment submitted successfully",
"submission": {
"id": "submission-456",
"status": "SUBMITTED",
"studentId": "student-789",
"aiAnalysis": {
"feedback": "Well-structured implementation with good comments",
"autoScore": 85,
"flaggedForReview": false,
"authenticityScore": 0.85
},
"submittedAt": "2025-11-17T14:00:00Z",
"assignmentId": "assignment-123"
}
}