Skip to main content
Challenges are designed as a set of questions that must be answered in a single attempt, without the ability to stop and resume it later. In this flow, a challenge attempt should be terminated immediately if the user leaves the question page.
All attempts that were not closed before the challenge end date will be terminated automatically.
To immediately close a challenge attempt for the current API user, execute the terminateChallengeAttempt mutation.
Use extraTimeSpent parameter to add an extra time (in seconds) to the general time that the current API user spent on the given challenge.
mutation terminateChallengeAttempt {
  terminateChallengeAttempt(challengeId: 1, extraTimeSpent: 10) {
    errors
    response {
      id
      completedOn
      cta {
        actionId
        title
        arguments {
          key
          value
        }
      }
    }
  }
}