Practice questions

The Question object and its five operations: free text, true or false, single or multiple choice; list, create, read, update and delete questions.

api.memojin.com/v1 · Contract 1.0.0-beta.2 · Beta

Sections · Questions

The practice questions of a content, held by its memocards or by the content itself. The API creates four types: free text (free_text), true or false (true_false), single choice (single_choice) and multiple choice (multiple_choice).

Fields by type

TypeFields to send
free_textcorrectAnswer: the expected answer
true_falsecorrectAnswer: true or false
single_choicechoices (2 to 10) and correctAnswer, one of the choices
multiple_choicechoices (2 to 10) and correctAnswers, several choices

Good to know

  • An existing question can change its prompt, explanation, difficulty and points; to change its type or answers, create it again.
  • Only the owner of a question updates or deletes it.
  • To generate a content’s questions with AI, see AI generations.

The Question object

A practice question.

FieldTypeDescription
idalways presentstring (uuid)Question identifier (UUID).
contentIdalways presentstring | nullContent the question belongs to.
memocardIdalways presentstring | nullParent memocard, or null for a question held directly by the content.
typealways presentstringQuestion type: free_text, true_false, single_choice, multiple_choice, short_answer, numeric, fill_in_blank, matching, ordering, categorization, table_completion, image_occlusion. New types may appear.
promptalways presentstring | nullThe question asked.
choicesalways presentstring[] | nullChoices of a single_choice or multiple_choice question; null for the other types.
correctAnsweralways presentstring | nullExpected answer (true/false for true_false); null for multiple_choice.
correctAnswersalways presentstring[] | nullExpected answers of a multiple_choice question; null for the other types.
explanationalways presentstring | nullExplanation shown after answering, or null.
difficultyalways presentstring | nullDifficulty (easy, medium, hard), or null.
pointsalways presentnumber | nullPoints of the question, or null.
tagsalways presentstring[]Tags (empty when none).
createdAtalways presentstring (date-time) | nullCreation instant (ISO 8601, UTC).
updatedAtalways presentstring (date-time) | nullLast update instant (ISO 8601, UTC).
Question
{
  "id": "e1d2c3b4-a5f6-4789-8abc-def012345678",
  "contentId": "3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87",
  "memocardId": null,
  "type": "single_choice",
  "prompt": "Which pigment absorbs light during photosynthesis?",
  "choices": [
    "Chlorophyll",
    "Haemoglobin",
    "Keratin"
  ],
  "correctAnswer": "Chlorophyll",
  "correctAnswers": null,
  "explanation": "Chlorophyll absorbs mostly blue and red light.",
  "difficulty": "easy",
  "points": 1,
  "tags": [],
  "createdAt": "2026-10-01T14:10:00.000Z",
  "updatedAt": "2026-10-01T14:10:00.000Z"
}

List the questions of a content

GET/v1/contents/{contentId}/questionsScope questions:read

Questions of the content (held by its memocards or by the content itself), in its order, paginated.

Parameters

FieldInTypeDescription
contentIdrequiredpathstring (uuid)Content identifier (UUID).
limitoptionalqueryintegerfrom 1 to 100 · default 20Number of items per page, 1 to 100 (default 20).
cursoroptionalquerystringat most 200 charactersOpaque cursor: the nextCursor of the previous page. Keep the same limit from one page to the next.

Response 200

A page of questions — A page of Question { data, nextCursor, hasMore }

Errors

HTTPMeaning
400validation_error or invalid_cursor
401invalid_api_key or revoked_api_key
403insufficient_scope, account_suspended, live_not_enabled or forbidden
404not_found — the content does not exist or is not visible to this key
406not_acceptable — the Accept header excludes application/json
429rate_limited or test_quota_exceeded — see the Retry-After and RateLimit-* headers
500internal_error
503unavailable — see the Retry-After header
Request
curl "https://api.memojin.com/v1/contents/3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87/questions?limit=20" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY"
Response 200
{
  "data": [
    {
      "id": "e1d2c3b4-a5f6-4789-8abc-def012345678",
      "contentId": "3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87",
      "memocardId": null,
      "type": "single_choice",
      "prompt": "Which pigment absorbs light during photosynthesis?",
      "choices": [
        "Chlorophyll",
        "Haemoglobin",
        "Keratin"
      ],
      "correctAnswer": "Chlorophyll",
      "correctAnswers": null,
      "explanation": "Chlorophyll absorbs mostly blue and red light.",
      "difficulty": "easy",
      "points": 1,
      "tags": [],
      "createdAt": "2026-10-01T14:10:00.000Z",
      "updatedAt": "2026-10-01T14:10:00.000Z"
    }
  ],
  "nextCursor": null,
  "hasMore": false
}

Create a question

POST/v1/contents/{contentId}/questionsScope questions:write

Adds a question held by the content. Types: free_text (correctAnswer), true_false (correctAnswer: true or false), single_choice (choices + correctAnswer), multiple_choice (choices + correctAnswers). Answers 201 with the question and its Location.

Parameters

FieldInTypeDescription
contentIdrequiredpathstring (uuid)Content identifier (UUID).
Idempotency-KeyoptionalheaderstringStrongly recommended. A unique value per operation (UUID v4), reused unchanged on every retry. Within 24 hours, the same key and the same request replay the first response (Idempotent-Replayed: true) without a second effect or charge; another request with the same key → 422 idempotency_key_reused; still running → 409 idempotency_in_progress.

Request body CreateQuestionRequest

A new question held by the content.

FieldTypeDescription
typerequired"free_text" | "true_false" | "single_choice" | "multiple_choice"Type of the question. The API creates free_text, true_false, single_choice and multiple_choice questions.
promptrequiredstring1 to 2000 charactersThe question asked (1 to 2,000 characters).
choicesoptionalstring[]2 to 10 itemssingle_choice and multiple_choice: 2 to 10 choices.
correctAnsweroptionalstring1 to 2000 charactersfree_text: the expected answer; true_false: true or false; single_choice: one of choices.
correctAnswersoptionalstring[]at least 1 itemmultiple_choice: the expected choices (each one of choices).
explanationoptionalstring | nullat most 5000 charactersExplanation shown after answering.
difficultyoptional"easy" | "medium" | "hard"Difficulty: easy, medium or hard.
pointsoptionalintegerfrom 1 to 100Points (default 1).

Response 201

The question created — A Question object

Errors

HTTPMeaning
400validation_error or bad_request
401invalid_api_key or revoked_api_key
403insufficient_scope, account_suspended, live_not_enabled or forbidden
404not_found — the content does not exist or is not visible to this key
406not_acceptable — the Accept header excludes application/json
409idempotency_in_progress — retry after Retry-After (1 s)
413payload_too_large
415unsupported_media_type
422idempotency_key_reused, or a business rule (see the description)
429rate_limited or test_quota_exceeded — see the Retry-After and RateLimit-* headers
500internal_error
503unavailable — see the Retry-After header
Request
curl -X POST "https://api.memojin.com/v1/contents/3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87/questions" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY" \
  -H "Idempotency-Key: 6f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "single_choice",
  "prompt": "Which pigment absorbs light during photosynthesis?",
  "choices": [
    "Chlorophyll",
    "Haemoglobin",
    "Keratin"
  ],
  "correctAnswer": "Chlorophyll",
  "explanation": "Chlorophyll absorbs mostly blue and red light."
}'
Response 201
{
  "id": "e1d2c3b4-a5f6-4789-8abc-def012345678",
  "contentId": "3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87",
  "memocardId": null,
  "type": "single_choice",
  "prompt": "Which pigment absorbs light during photosynthesis?",
  "choices": [
    "Chlorophyll",
    "Haemoglobin",
    "Keratin"
  ],
  "correctAnswer": "Chlorophyll",
  "correctAnswers": null,
  "explanation": "Chlorophyll absorbs mostly blue and red light.",
  "difficulty": "easy",
  "points": 1,
  "tags": [],
  "createdAt": "2026-10-01T14:10:00.000Z",
  "updatedAt": "2026-10-01T14:10:00.000Z"
}

Retrieve a question

GET/v1/questions/{questionId}Scope questions:read

One question visible to the account the API key acts for. Answers 304 to a matching If-None-Match.

Parameters

FieldInTypeDescription
questionIdrequiredpathstring (uuid)Question identifier (UUID).

Response 200

The question — A Question object

Errors

HTTPMeaning
400validation_error — an identifier is not a UUID
401invalid_api_key or revoked_api_key
403insufficient_scope, account_suspended, live_not_enabled or forbidden
404not_found
406not_acceptable — the Accept header excludes application/json
429rate_limited or test_quota_exceeded — see the Retry-After and RateLimit-* headers
500internal_error
503unavailable — see the Retry-After header
Request
curl "https://api.memojin.com/v1/questions/e1d2c3b4-a5f6-4789-8abc-def012345678" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY"
Response 200
{
  "id": "e1d2c3b4-a5f6-4789-8abc-def012345678",
  "contentId": "3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87",
  "memocardId": null,
  "type": "single_choice",
  "prompt": "Which pigment absorbs light during photosynthesis?",
  "choices": [
    "Chlorophyll",
    "Haemoglobin",
    "Keratin"
  ],
  "correctAnswer": "Chlorophyll",
  "correctAnswers": null,
  "explanation": "Chlorophyll absorbs mostly blue and red light.",
  "difficulty": "easy",
  "points": 1,
  "tags": [],
  "createdAt": "2026-10-01T14:10:00.000Z",
  "updatedAt": "2026-10-01T14:10:00.000Z"
}

Update a question

PATCH/v1/questions/{questionId}Scope questions:write

Changes the question text, the explanation, the difficulty or the points. Owner only.

Parameters

FieldInTypeDescription
questionIdrequiredpathstring (uuid)Question identifier (UUID).

Request body UpdateQuestionRequest

The fields to change; the others stay as they are. Answers and choices change in the app (their shape depends on the type).

FieldTypeDescription
promptoptionalstring1 to 2000 charactersNew question text.
explanationoptionalstring | nullat most 5000 charactersNew explanation, or null to clear it.
difficultyoptional"easy" | "medium" | "hard"Difficulty: easy, medium or hard.
pointsoptionalintegerfrom 1 to 100New points.

Response 200

The question updated — A Question object

Errors

HTTPMeaning
400validation_error or bad_request
401invalid_api_key or revoked_api_key
403insufficient_scope, account_suspended, live_not_enabled or forbidden
404not_found
406not_acceptable — the Accept header excludes application/json
412precondition_failed — If-Match does not match the current ETag
413payload_too_large
415unsupported_media_type
429rate_limited or test_quota_exceeded — see the Retry-After and RateLimit-* headers
500internal_error
503unavailable — see the Retry-After header
Request
curl -X PATCH "https://api.memojin.com/v1/questions/e1d2c3b4-a5f6-4789-8abc-def012345678" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Which pigment absorbs most of the light?"
}'
Response 200
{
  "id": "e1d2c3b4-a5f6-4789-8abc-def012345678",
  "contentId": "3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87",
  "memocardId": null,
  "type": "single_choice",
  "prompt": "Which pigment absorbs light during photosynthesis?",
  "choices": [
    "Chlorophyll",
    "Haemoglobin",
    "Keratin"
  ],
  "correctAnswer": "Chlorophyll",
  "correctAnswers": null,
  "explanation": "Chlorophyll absorbs mostly blue and red light.",
  "difficulty": "easy",
  "points": 1,
  "tags": [],
  "createdAt": "2026-10-01T14:10:00.000Z",
  "updatedAt": "2026-10-01T14:10:00.000Z"
}

Delete a question

DELETE/v1/questions/{questionId}Scope questions:write

Deletes the question. Owner only. Answers 204 without a body.

Parameters

FieldInTypeDescription
questionIdrequiredpathstring (uuid)Question identifier (UUID).

Response 204

Deleted — No response body.

Errors

HTTPMeaning
400validation_error — an identifier is not a UUID
401invalid_api_key or revoked_api_key
403insufficient_scope, account_suspended, live_not_enabled or forbidden
404not_found
406not_acceptable — the Accept header excludes application/json
412precondition_failed — If-Match does not match the current ETag
429rate_limited or test_quota_exceeded — see the Retry-After and RateLimit-* headers
500internal_error
503unavailable — see the Retry-After header
Request
curl -X DELETE "https://api.memojin.com/v1/questions/e1d2c3b4-a5f6-4789-8abc-def012345678" \
  -H "Authorization: Bearer $MEMOJIN_API_KEY"