POST /api/v1/assignment/{id}/submit

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.

Path parameters

  • id string Required

    UUID of the assignment to submit

application/json

Body Required

Submission data including text response or file URL

  • responseText string

    Text answer or code submission (will be analyzed by AI)

  • fileUrl string

    URL of uploaded file submission

Responses

  • 201 application/json

    Assignment submitted successfully (may include AI analysis and auto-score)

  • 400

    Invalid submission data or deadline passed

  • 404

    Assignment not found

POST /api/v1/assignment/{id}/submit
curl \
 --request POST 'https://api.echoplain.social/api/v1/assignment/assignment-123/submit' \
 --header "Content-Type: application/json" \
 --data '{"responseText":"Implementation of merge sort and quicksort algorithms..."}'
Request examples
{
  "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"
  }
}