Skip to content

Attaches an anonymous attempt to a learner in the caller's pod.

POST
/api/v1/attempts/{id}/claims
curl --request POST \
--url https://app.jadwigo.pl/api/v1/attempts/example/claims \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "learner_id": "example" }'

A replay by the same account for the same learner returns the stored claim; any other claim of a claimed attempt is 409 AttemptClaimed.

id
required
string
/^att_[0-7][0-9a-hjkmnp-tv-z]{25}$/
Media typeapplication/json
object
learner_id
required
string
/^lrn_[0-7][0-9a-hjkmnp-tv-z]{25}$/

Example generated

{
"learner_id": "example"
}

Created.

Media typeapplication/json
object
attempt_id
required
string
/^att_[0-7][0-9a-hjkmnp-tv-z]{25}$/
learner_id
required
string
/^lrn_[0-7][0-9a-hjkmnp-tv-z]{25}$/
claimed_by
required
string
/^acc_[0-7][0-9a-hjkmnp-tv-z]{25}$/
claimed_at
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/

Example generated

{
"attempt_id": "example",
"learner_id": "example",
"claimed_by": "example",
"claimed_at": "2026-04-15T12:00:00Z"
}

An error: {error: {type, message}}. The type names the cause, and answers with one status:

  • 400: BadRequest, ServerFieldSupplied
  • 401: NotSignedIn, Unauthorized
  • 404: NotFound
  • 409: AccountMissing, AttemptClaimed, AttemptPreview, AssignmentClosed, AttemptFinished, AttemptNotFinished, AttemptPaused, QuestionNotOpen, TryOutOfOrder, AnswerConflict, EventIdMismatch, WriteOnce
  • 429: AnswerLimit
  • 502: BankUnavailable
Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: BadRequest ServerFieldSupplied NotSignedIn NotFound AccountMissing AttemptClaimed AttemptPreview AssignmentClosed AttemptFinished AttemptNotFinished AttemptPaused QuestionNotOpen TryOutOfOrder AnswerConflict EventIdMismatch WriteOnce AnswerLimit Unauthorized BankUnavailable
message
required
string

Example

{
"error": {
"type": "BadRequest"
}
}

An error: {error: {type, message}}. The type names the cause, and answers with one status:

  • 400: BadRequest, ServerFieldSupplied
  • 401: NotSignedIn, Unauthorized
  • 404: NotFound
  • 409: AccountMissing, AttemptClaimed, AttemptPreview, AssignmentClosed, AttemptFinished, AttemptNotFinished, AttemptPaused, QuestionNotOpen, TryOutOfOrder, AnswerConflict, EventIdMismatch, WriteOnce
  • 429: AnswerLimit
  • 502: BankUnavailable
Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: BadRequest ServerFieldSupplied NotSignedIn NotFound AccountMissing AttemptClaimed AttemptPreview AssignmentClosed AttemptFinished AttemptNotFinished AttemptPaused QuestionNotOpen TryOutOfOrder AnswerConflict EventIdMismatch WriteOnce AnswerLimit Unauthorized BankUnavailable
message
required
string

Example

{
"error": {
"type": "BadRequest"
}
}

An error: {error: {type, message}}. The type names the cause, and answers with one status:

  • 400: BadRequest, ServerFieldSupplied
  • 401: NotSignedIn, Unauthorized
  • 404: NotFound
  • 409: AccountMissing, AttemptClaimed, AttemptPreview, AssignmentClosed, AttemptFinished, AttemptNotFinished, AttemptPaused, QuestionNotOpen, TryOutOfOrder, AnswerConflict, EventIdMismatch, WriteOnce
  • 429: AnswerLimit
  • 502: BankUnavailable
Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: BadRequest ServerFieldSupplied NotSignedIn NotFound AccountMissing AttemptClaimed AttemptPreview AssignmentClosed AttemptFinished AttemptNotFinished AttemptPaused QuestionNotOpen TryOutOfOrder AnswerConflict EventIdMismatch WriteOnce AnswerLimit Unauthorized BankUnavailable
message
required
string

Example

{
"error": {
"type": "BadRequest"
}
}