Documentation

Learning

Mark content as complete

Marks a video (type 1) or PDF (type 2) content as completed. Quiz content (type >= 3) should use the submit endpoint instead.

ProductionStagingUAT
POSThttps://ankiren.com/api/courses/{courseId}/content/{contentId}/complete

Parameters

Path Parameters

  • courseIdintegerpathRequired
  • contentIdintegerpathRequired

Responses

200 · Content marked as complete

  • successboolean
  • progressUserContentProgress
    • idinteger
    • userIdstring
    • contentIdinteger
    • status"not_started" | "in_progress" | "completed"
    • scoreinteger?

      Quiz score as percentage (0-100)

    • totalQuestionsinteger?
    • completedAtstring<date-time>?
      format: date-time
    • updatedAtstring<date-time>
      format: date-time
application/json
{
  "success": true,
  "progress": {
    "id": 1,
    "userId": "user_abc123",
    "contentId": 1,
    "status": "completed",
    "score": 85,
    "totalQuestions": 10,
    "completedAt": "2026-01-01T00:00:00.000Z",
    "updatedAt": "2026-01-01T00:00:00.000Z"
  }
}

Sample Code

Đổi ngôn ngữ ở ô Language trên thanh Documentation.

cURL
curl -X POST 'https://ankiren.com/api/courses/{courseId}/content/{contentId}/complete' \
  -H 'Authorization: Bearer <token>' \
  -H 'Accept: application/json'