Skip to content

Initialize Quiz (Anonymous)

Initialize a quiz for an anonymous user and generate an empty answer object.


Overview

This endpoint creates an empty quiz answer object for anonymous users and returns both the answer object and the anonymous user ID.

Method: POST
Endpoint:
/api/v1/namespaces/:namespaceId/quizzes/:quizId/users/anonymous/initQuiz

Quiz must support anonymous participation.


Request

Path Parameters

ParameterTypeRequiredDescription
namespaceIdstringNamespace unique ID
quizIdstringQuiz unique ID
invitedUserUUIDstringInvited user unique ID

Body

json
{
  "anonymousUserId": "anon_12345ABC"
}

Body Parameters

FieldTypeRequiredDescription
anonymousUserIdstringAnonymous user identifier
languagestringRequire language for questions, en for English, es for Spanish
customParamsobjectOptional custom parameters, useful for tracking UTM tags or any information needed

Response

json
{
  "answers": {
    "id": "12345ABCD-anon1234",
    "userId": "anon1234",
    "quizId": "abc12345",
    "qAnswers": {},
    "completionStatus": 1,
    "isAnonymous": true
  },
  "anonymousUserId": "anon_12345ABC"
}