PATCH /api/v1/assignment/{id}/content/{contentId}

Update specific content block within an assignment. Only admins and lecturers can update content.

Path parameters

  • id string Required

    UUID of the assignment

  • contentId string Required

    UUID of the content block to update

application/json

Body Required

Updated content data (partial update supported)

  • question string
  • type string

    Default value is UNSTRUCTURED.

Responses

  • 200 application/json

    Content updated successfully

  • 400

    Invalid content data

  • 403

    Forbidden - Admin or Lecturer role required

  • 404

    Assignment or content not found

PATCH /api/v1/assignment/{id}/content/{contentId}
curl \
 --request PATCH 'https://api.echoplain.social/api/v1/assignment/assignment-123/content/content-1' \
 --header "Content-Type: application/json" \
 --data '{"text":"Updated instructions:\n1. Implement merge sort\n2. Implement quicksort\n3. Compare performance"}'
Request example
{
  "text": "Updated instructions:\n1. Implement merge sort\n2. Implement quicksort\n3. Compare performance"
}
Response examples (200)
{
  "content": {
    "id": "content-1",
    "text": "Updated instructions...",
    "updatedAt": "2025-11-17T15:00:00Z"
  },
  "message": "Content updated successfully"
}