Appearance
Submit All Answers (Anonymous User)
Submit all quiz answers at once for an anonymous user.
Overview
This endpoint allows submitting all answers to a quiz in a single request for an anonymous user. It marks the quiz as completed and returns the updated answer object.
Method: POST
Endpoint:/api/v1/namespaces/:namespaceId/quizzes/:quizId/users/anonymous/answers/submit
Quiz must support anonymous participation.
Request
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
namespaceId | string | ✅ | Namespace unique ID |
quizId | string | ✅ | Quiz unique ID |
Body
json
{
"anonymousUserId": "anon_12345",
"answers": {
"question1": {
"type": "text",
"value": "Answer content"
},
"question2": {
"type": "multiple_choice",
"value": "Option B"
}
},
"language": "en"
}Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
anonymousUserId | string | ✅ | Anonymous user identifier |
answers | object | ✅ | Object mapping question IDs to answer objects |
language | string | ❌ | Optional language code |
Response
json
{
"answers": {
"id": "quiz1234-anon_12345",
"userId": "anon_12345",
"quizId": "quiz1234",
"qAnswers": { ... },
"completionStatus": 3,
"isAnonymous": true
},
"anonymousUserId": "anon_12345"
}Error Responses
500 Internal Server Error– If the quiz does not exist
json
{
"error": "quiz does not exist"
}Other possible errors:
- Quiz not found
- Namespace not found