Appearance
Post Answers (Anonymous User)
Submit quiz answers for an anonymous user.
Overview
This endpoint allows submitting answers to quiz questions for an anonymous user. It returns the updated answer object and the anonymous user ID.
Method: POST
Endpoint:/api/v1/namespaces/:namespaceId/quizzes/:quizId/users/anonymous/answers
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",
"questionId": "question123",
"answer": {
"type": "text",
"value": "Answer content"
},
"language": "en"
}Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
anonymousUserId | string | ✅ | Anonymous user identifier |
questionId | string | ✅ | ID of the question being answered |
answer | object | ✅ | Answer content |
language | string | ❌ | Optional language preference |
Response
json
{
"answers": {
"id": "quiz1234-anon_12345",
"userId": "anon_12345",
"quizId": "quiz1234",
"qAnswers": {},
"completionStatus": 2,
"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
- Invited user not found